                              # Legend:


# Risk aversion and treatment on behavior change wave 1 to wave 3 - lines 340:344
# Risk aversion and treatment on attitude change wave 1 to wave 3 - lines 502:504
# Conspiratorial ideation and treatment on behavior change wave 1 to wave 2 - lines 653:655
# Conspiratorial ideation and treatment on perception change wave 1 to wave 3 - lines 944:946
#Calculation of Results %'s for Abstract and Results Sections - Line 3162:3267
# Creating histograms for figure 4 - Line 3276:end

library(plm)
library(tibble)
library(tidyverse)
library(haven)
library(pastecs)
library(schoRsch)
library(xtable)
library(broom)
library(purrr)
library(foreign)
library(mice)
library(lme4)
library(coda)
library(MASS)
library(reshape2)
library(car)
library(kaps)
library(RColorBrewer)
library(knitr)
library(rjags)
library(runjags)
library(xtable)
library(MCMCpack)
library(R2jags)
library(bayesplot)
library(ggplot2)
library(rstanarm)
library(runjags)
library(MNP)
library(Hmisc)
library(readxl)
library(ggplot2)
library(coin)
library(ggrepel)
library(extrafont)
library(lmtest)
library(plm)
library(stargazer)
library(sandwich)
library(xtable)
library(margins)
library(devtools)
library(olsrr)
library(ggpubr)
library(rtf)
library(pastecs)
library(ggridges)
library(arsenal)
library(Gmisc)
library(writexl)
library(scales)

setwd("C:/Users/evanl/Desktop/Projects/COVID/Analysis")
set.seed(271828)

final_data<- read_dta("C:/Users/evanl/Desktop/Projects/COVID/Analysis/Final Cleaned Experimental Data.dta")
attach(final_data)

write.csv(final_data, "C:/Users/evanl/Desktop/Projects/COVID/Analysis/Final Cleaned Experimental Data.csv")
colSums(is.na(final_data) )
t1<-t.test(covidThreatW1[which(covidThreatW1!=99)]~test[which(covidThreatW1!=99)])

y1 <- covidThreatW1[which(test==0, covidThreatW1!=99)]
y2 <- covidThreatW1[which(test==1, covidThreatW1!=99)]

summary(y1)
summary(y2)
View(final_data$UID)

# Illustration of COVID Threat post Treatment by Group

ggplot(data=final_data, aes(x=covidThreatW1, y=test, group=factor(test))) + geom_density_ridges2(aes(fill=factor(test)), scale=1) + 
  theme_minimal() +
  scale_fill_grey(name="Group", labels=c("Control", "Test"), start = 0.5, end = 0.9, guide = guide_legend(reverse = TRUE)) + labs(x="Perceived COVID-19 Threat", y="Frequency") + 
  theme(axis.text.y = element_blank(), axis.text.x = element_text(size=14), legend.text=element_text(size=14), 
  axis.title.y = element_text(size=18), axis.title.x = element_text(size=18), legend.title = element_text(size=18)) 

# Creating a Descriptive Statistics Table

xasd<-stat.desc(edu)

xasd$test<-stat.desc(test)

# Outcome Measures
xasd$knowledge1<-stat.desc(knowledge1)
xasd$knowledge2<-stat.desc(knowledge2)
xasd$knowledge3<-stat.desc(knowledge3)
xasd$knowledgeW12<-stat.desc(knowledgeW12)
xasd$knowledgeW23<-stat.desc(knowledgeW23)
xasd$knowledgeW13<-stat.desc(knowledgeW13)

xasd$attitude1<-stat.desc(attitude1)
xasd$attitude2<-stat.desc(attitude2)
xasd$attitude3<-stat.desc(attitude3)
xasd$attitudeW12<-stat.desc(attitudeW12)
xasd$attitudeW23<-stat.desc(attitudeW23)
xasd$attitudeW13<-stat.desc(attitudeW13)

xasd$perception1<-stat.desc(perception1)
xasd$perception2<-stat.desc(perception2)
xasd$perception3<-stat.desc(perception3)
xasd$perceptionW12<-stat.desc(perceptionW12)
xasd$perceptionW23<-stat.desc(perceptionW23)
xasd$perceptionW13<-stat.desc(perceptionW13)

xasd$fBehave1<-stat.desc(fBehave1)
xasd$fBehave2<-stat.desc(fBehave2)
xasd$fBehave3<-stat.desc(fBehave3)
xasd$fBehaveW12<-stat.desc(fBehaveW12)
xasd$fBehaveW23<-stat.desc(fBehaveW23)
xasd$fBehaveW13<-stat.desc(fBehaveW13)

# Covariates

xasd$norm1<-stat.desc(norm1)
xasd$norm2<-stat.desc(norm2)
xasd$norm3<-stat.desc(norm3)
xasd$normW12<-stat.desc(normW12)
xasd$normW23<-stat.desc(normW23)
xasd$normW13<-stat.desc(normW13)

xasd$riskaverse<-stat.desc(riskaverse)
xasd$soctrust<-stat.desc(soctrust)
xasd$conspir<-stat.desc(conspir)
xasd$instiTrustNational<-stat.desc(instiTrustNational)
xasd$instiTrustGeorgia<-stat.desc(instiTrustGeorgia)
xasd$RWnews<-stat.desc(RWnews)

write_xlsx(xasd, "C:/Users/evanl/Desktop/Projects/COVID/Analysis/Descriptive Statistics.xlsx")

# Testing on non-conditional hypothesis - exposure to treatment increases KAP-B

a1a<-t.test(knowledge1[which(knowledge1!=99)]~test[which(knowledge1!=99)])
a1b<-t.test(knowledge2[which(knowledge2!=99)]~test[which(knowledge2!=99)])
a1c<-t.test(knowledge3[which(knowledge3!=99)]~test[which(knowledge3!=99)])
a1d<-t.test(knowledgeW12[which(knowledgeW12!=99)]~test[which(knowledgeW12!=99)])
a1e<-t.test(knowledgeW23[which(knowledgeW23!=99)]~test[which(knowledgeW23!=99)])
a1f<-t.test(knowledgeW13[which(knowledgeW13!=99)]~test[which(knowledgeW13!=99)])

a2a<-t.test(perception1[which(perception1!=99)]~test[which(perception1!=99)])
a2b<-t.test(perception2[which(perception2!=99)]~test[which(perception2!=99)])
a2c<-t.test(perception3[which(perception3!=99)]~test[which(perception3!=99)])
a2d<-t.test(perceptionW12[which(perceptionW12!=99)]~test[which(perceptionW12!=99)])
a2e<-t.test(perceptionW23[which(perceptionW23!=99)]~test[which(perceptionW23!=99)])
a2f<-t.test(perceptionW13[which(perceptionW13!=99)]~test[which(perceptionW13!=99)])

a3a<-t.test(attitude1[which(attitude1!=99)]~test[which(attitude1!=99)])
a3b<-t.test(attitude2[which(attitude2!=99)]~test[which(attitude2!=99)])
a3c<-t.test(attitude3[which(attitude3!=99)]~test[which(attitude3!=99)])
a3d<-t.test(attitudeW12[which(attitudeW12!=99)]~test[which(attitudeW12!=99)])
a3e<-t.test(attitudeW23[which(attitudeW23!=99)]~test[which(attitudeW23!=99)])
a3f<-t.test(attitudeW13[which(attitudeW13!=99)]~test[which(attitudeW13!=99)])

a4a<-t.test(fBehave1[which(fBehave1!=99)]~test[which(fBehave1!=99)])
a4b<-t.test(fBehave2[which(fBehave2!=99)]~test[which(fBehave2!=99)])
a4c<-t.test(fBehave3[which(fBehave3!=99)]~test[which(fBehave3!=99)])
a4d<-t.test(fBehaveW12[which(fBehaveW12!=99)]~test[which(fBehaveW12!=99)])
a4e<-t.test(fBehaveW23[which(fBehaveW23!=99)]~test[which(fBehaveW23!=99)])
a4f<-t.test(fBehaveW13[which(fBehaveW13!=99)]~test[which(fBehaveW13!=99)])

a5a<-t.test(norm1[which(norm1!=99)]~test[which(norm1!=99)])
a5b<-t.test(norm2[which(norm2!=99)]~test[which(norm2!=99)])
a5c<-t.test(norm3[which(norm3!=99)]~test[which(norm3!=99)])
a5d<-t.test(normW12[which(normW12!=99)]~test[which(normW12!=99)])
a5e<-t.test(normW23[which(normW23!=99)]~test[which(normW23!=99)])
a5f<-t.test(normW13[which(normW13!=99)]~test[which(normW13!=99)])

a6a<-t.test(concern2[which(concern2!=99)]~test[which(concern2!=99)])
a6b<-t.test(concern3[which(concern3!=99)]~test[which(concern3!=99)])
a6c<-t.test(concernW23[which(concernW23!=99)]~test[which(concernW23!=99)])

a7a<-t.test(groupEvent1[which(groupEvent1!=99)]~test[which(groupEvent1!=99)])
a7b<-t.test(groupEvent3[which(groupEvent3!=99)]~test[which(groupEvent3!=99)])
a7c<-t.test(groupEventW13[which(groupEventW13!=99)]~test[which(groupEventW13!=99)])

a8a<-t.test(shopping1[which(shopping1!=99)]~test[which(shopping1!=99)])
a8b<-t.test(shopping2[which(shopping2!=99)]~test[which(shopping2!=99)])
a8c<-t.test(shoppingW12[which(shoppingW12!=99)]~test[which(shoppingW12!=99)])

a9a<-t.test(dining2[which(dining2!=99)]~test[which(dining2!=99)])
a9b<-t.test(dining3[which(dining3!=99)]~test[which(dining3!=99)])
a9c<-t.test(diningW23[which(diningW23!=99)]~test[which(diningW23!=99)])

a1a
a1b
a1c
a1d
a1e
a1f

a2a
a2b
a2c
a2d
a2e
a2f

a3a
a3b
a3c
a3d
a3e
a3f

a4a
a4b
a4c
a4d
a4e
a4f

a5a
a5b
a5c
a5d
a5e
a5f

a6a
a6b
a6c

a7a
a7b
a7c

a8a
a8b
a8c

a9a
a9b
a9c



# qqPlot indicating observations with outsized influence. Exclusion criteria where studentized residuals>|5| and t>|2|
# BP test for heteroskedasticity
# All p criteria are p<0.05
#############################################################################################################################################################################################

# H3 Behaviors
h3a_a<-lm(fBehave1 ~ test)
bptest(h3a_a)
qqPlot(h3a_a)
h3a_b<-lm(fBehave1 ~ riskaverse)
bptest(h3a_b)
qqPlot(h3a_b)
h3a_c<-lm(fBehave1 ~ test + riskaverse)
bptest(h3a_c)
qqPlot(h3a_c)
h3a_d<-lm(fBehave1 ~ test + riskaverse + test:riskaverse)
bptest(h3a_d)
qqPlot(h3a_d)
h3a_e<-lm(fBehave2 ~ test)
bptest(h3a_e)
qqPlot(h3a_e)
h3a_f<-lm(fBehave2 ~ riskaverse)
bptest(h3a_f)
qqPlot(h3a_f)
h3a_g<-lm(fBehave2 ~ test + riskaverse)
bptest(h3a_g)
qqPlot(h3a_g)
cov_h3a_g<-vcovHC(h3a_g, type="HC3")
rob_h3a_g<-sqrt(diag(cov_h3a_g))
h3a_h<-lm(fBehave2 ~ test + riskaverse + test:riskaverse)
bptest(h3a_h)
qqPlot(h3a_h)
cov_h3a_h<-vcovHC(h3a_h, type="HC3")
rob_h3a_h<-sqrt(diag(cov_h3a_h))
h3a_i<-lm(fBehave3 ~ test)
bptest(h3a_i)
qqPlot(h3a_i)
cov_h3a_i<-vcovHC(h3a_i, type="HC3")
rob_h3a_i<-sqrt(diag(cov_h3a_i))
h3a_j<-lm(fBehave3 ~ riskaverse)
bptest(h3a_j)
qqPlot(h3a_j)
h3a_k<-lm(fBehave3 ~ test + riskaverse)
bptest(h3a_k)
qqPlot(h3a_k)
cov_h3a_k<-vcovHC(h3a_k, type="HC3")
rob_h3a_k <-sqrt(diag(cov_h3a_k))
h3a_l<-lm(fBehave3 ~ test + riskaverse + test:riskaverse)
bptest(h3a_l)
qqPlot(h3a_l)
h3a_m<-lm(fBehaveW12 ~ test)
bptest(h3a_m)
qqPlot(h3a_m)
cov_h3a_m<-vcovHC(h3a_m, type="HC3")
rob_h3a_m<-sqrt(diag(cov_h3a_m))
h3a_n<-lm(fBehaveW12 ~ riskaverse)
bptest(h3a_n)
qqPlot(h3a_n)
h3a_o<-lm(fBehaveW12 ~ test + riskaverse)
bptest(h3a_o)
qqPlot(h3a_o)
h3a_p<-lm(fBehaveW12 ~ test + riskaverse + test:riskaverse)
bptest(h3a_p)
qqPlot(h3a_p)
h3a_q<-lm(fBehaveW23 ~ test)
bptest(h3a_q)
h3a_r<-lm(fBehaveW23 ~ riskaverse)
bptest(h3a_r)
qqPlot(h3a_r)
h3a_r<-lm(fBehaveW23 ~ riskaverse, data=final_data[-850,])
bptest(h3a_r)
qqPlot(h3a_r)
h3a_s<-lm(fBehaveW23 ~ test + riskaverse)
bptest(h3a_s)
qqPlot(h3a_s)
h3a_s<-lm(fBehaveW23 ~ test + riskaverse, data=final_data[-850,])
bptest(h3a_s)
qqPlot(h3a_s)
h3a_t<-lm(fBehaveW23 ~ test + riskaverse + test:riskaverse)
bptest(h3a_t)
qqPlot(h3a_t)
h3a_t<-lm(fBehaveW23 ~ test + riskaverse + test:riskaverse, data = final_data[-850,])
bptest(h3a_t)
qqPlot(h3a_t)
h3a_u<-lm(fBehaveW13 ~ test)
bptest(h3a_u)
qqPlot(h3a_u)
h3a_v<-lm(fBehaveW13 ~ riskaverse)
bptest(h3a_v)
qqPlot(h3a_v)
h3a_w<-lm(fBehaveW13 ~ test + riskaverse)
bptest(h3a_w)
qqPlot(h3a_w)
h3a_x<-lm(fBehaveW13 ~ test + riskaverse + test:riskaverse)
bptest(h3a_x)
qqPlot(h3a_x)
cov_h3a_x<-vcovHC(h3a_x, type="HC3")
rob_h3a_x<-sqrt(diag(cov_h3a_x))

# H3 Knowledge

h3b_a<-lm(knowledge1 ~ test)
bptest(h3b_a)
qqPlot(h3b_a)
h3b_b<-lm(knowledge1 ~ riskaverse)
bptest(h3b_b)
qqPlot(h3b_b)
h3b_c<-lm(knowledge1 ~ test + riskaverse)
bptest(h3b_c)
qqPlot(h3b_c)
h3b_d<-lm(knowledge1 ~ test + riskaverse + test:riskaverse)
bptest(h3b_d)
qqPlot(h3b_d)
h3b_e<-lm(knowledge2 ~ test)
bptest(h3b_e)
qqPlot(h3b_e)
h3b_f<-lm(knowledge2 ~ riskaverse)
bptest(h3b_f)
qqPlot(h3b_f)
h3b_g<-lm(knowledge2 ~ test + riskaverse)
bptest(h3b_g)
qqPlot(h3b_g)
h3b_h<-lm(knowledge2 ~ test + riskaverse + test:riskaverse)
bptest(h3b_h)
qqPlot(h3b_h)
h3b_i<-lm(knowledge3 ~ test)
bptest(h3b_i)
qqPlot(h3b_i)
h3b_j<-lm(knowledge3 ~ riskaverse)
bptest(h3b_j)
qqPlot(h3b_j)
h3b_k<-lm(knowledge3 ~ test + riskaverse)
bptest(h3b_k)
qqPlot(h3b_k)
h3b_l<-lm(knowledge3 ~ test + riskaverse + test:riskaverse)
bptest(h3b_l)
qqPlot(h3b_l)
h3b_m<-lm(knowledgeW12 ~ test)
bptest(h3b_m)
qqPlot(h3b_m)
h3b_n<-lm(knowledgeW12 ~ riskaverse)
bptest(h3b_n)
qqPlot(h3b_n)
h3b_o<-lm(knowledgeW12 ~ test + riskaverse)
bptest(h3b_o)
qqPlot(h3b_o)
h3b_p<-lm(knowledgeW12 ~ test + riskaverse + test:riskaverse)
bptest(h3b_p)
qqPlot(h3b_p)
h3b_q<-lm(knowledgeW23 ~ test)
bptest(h3b_q)
qqPlot(h3b_q)
h3b_r<-lm(knowledgeW23 ~ riskaverse)
bptest(h3b_r)
qqPlot(h3b_r)
axis(side=2, at=(c(-5,0,5)))
h3b_s<-lm(knowledgeW23 ~ test + riskaverse)
bptest(h3b_s)
qqPlot(h3b_s, yaxt="n")
axis(side=2, at=(c(-5,0,5)))
h3b_t<-lm(knowledgeW23 ~ test + riskaverse + test:riskaverse)
bptest(h3b_t)
qqPlot(h3b_t)
h3b_u<-lm(knowledgeW13 ~ test)
bptest(h3b_u)
qqPlot(h3b_u)
h3b_v<-lm(knowledgeW13 ~ riskaverse)
bptest(h3b_v)
qqPlot(h3b_v)
h3b_w<-lm(knowledgeW13 ~ test + riskaverse)
bptest(h3b_w)
qqPlot(h3b_w)
h3b_x<-lm(knowledgeW13 ~ test + riskaverse + test:riskaverse)
bptest(h3b_x)
qqPlot(h3b_x)

# H3 Attitudes

h3c_a<-lm(attitude1 ~ test)
bptest(h3c_a)
qqPlot(h3c_a)
h3c_b<-lm(attitude1 ~ riskaverse)
bptest(h3c_b)
qqPlot(h3c_b)
h3c_c<-lm(attitude1 ~ test + riskaverse)
bptest(h3c_c)
qqPlot(h3c_c)
h3c_d<-lm(attitude1 ~ test + riskaverse + test:riskaverse)
bptest(h3c_d)
qqPlot(h3c_d)
h3c_e<-lm(attitude2 ~ test)
bptest(h3c_e)
qqPlot(h3c_e)
h3c_f<-lm(attitude2 ~ riskaverse)
bptest(h3c_f)
qqPlot(h3c_f)
cov_h3c_f<-vcovHC(h3c_f, type="HC3")
rob_h3c_f<-sqrt(diag(cov_h3c_f))
h3c_g<-lm(attitude2 ~ test + riskaverse)
bptest(h3c_g)
qqPlot(h3c_g)
cov_h3c_g<-vcovHC(h3c_g, type="HC3")
rob_h3c_g<-sqrt(diag(cov_h3c_g))
h3c_h<-lm(attitude2 ~ test + riskaverse + test:riskaverse)
bptest(h3c_h)
qqPlot(h3c_h)
cov_h3c_h<-vcovHC(h3c_h, type="HC3")
rob_h3c_h<-sqrt(diag(cov_h3c_h))
h3c_i<-lm(attitude3 ~ test)
bptest(h3c_i)
qqPlot(h3c_i)
h3c_j<-lm(attitude3 ~ riskaverse)
bptest(h3c_j)
qqPlot(h3c_j)
cov_h3c_j<-vcovHC(h3c_j, type="HC3")
rob_h3c_j<-sqrt(diag(cov_h3c_j))
h3c_k<-lm(attitude3 ~ test + riskaverse)
bptest(h3c_k)
qqPlot(h3c_k)
h3c_l<-lm(attitude3 ~ test + riskaverse + test:riskaverse)
bptest(h3c_l)
qqPlot(h3c_l)
h3c_m<-lm(attitudeW12 ~ test)
bptest(h3c_m)
qqPlot(h3c_m)
h3c_n<-lm(attitudeW12 ~ riskaverse)
bptest(h3c_n)
qqPlot(h3c_n)
h3c_o<-lm(attitudeW12 ~ test + riskaverse)
bptest(h3c_o)
qqPlot(h3c_o)
h3c_p<-lm(attitudeW12 ~ test + riskaverse + test:riskaverse)
bptest(h3c_p)
qqPlot(h3c_p)
h3c_q<-lm(attitudeW23 ~ test)
bptest(h3c_q)
qqPlot(h3c_q)
h3c_r<-lm(attitudeW23 ~ riskaverse)
bptest(h3c_r)
qqPlot(h3c_r)
h3c_s<-lm(attitudeW23 ~ test + riskaverse)
bptest(h3c_s)
qqPlot(h3c_s)
h3c_t<-lm(attitudeW23 ~ test + riskaverse + test:riskaverse)
bptest(h3c_t)
qqPlot(h3c_t)
h3c_u<-lm(attitudeW13 ~ test)
bptest(h3c_u)
qqPlot(h3c_u)
h3c_v<-lm(attitudeW13 ~ riskaverse)
bptest(h3c_v)
qqPlot(h3c_v)
h3c_w<-lm(attitudeW13 ~ test + riskaverse)
bptest(h3c_w)
qqPlot(h3c_w)
h3c_x<-lm(attitudeW13 ~ test + riskaverse + test:riskaverse)
bptest(h3c_x)
qqPlot(h3c_x)

# H3 Perception

h3d_a<-lm(perception1 ~ test)
bptest(h3d_a)
qqPlot(h3d_a)
h3d_b<-lm(perception1 ~ riskaverse)
bptest(h3d_b)
qqPlot(h3d_b)
h3d_c<-lm(perception1 ~ test + riskaverse)
bptest(h3d_c)
qqPlot(h3d_c)
h3d_d<-lm(perception1 ~ test + riskaverse + test:riskaverse)
bptest(h3d_d)
qqPlot(h3d_d)
h3d_e<-lm(perception2 ~ test)
bptest(h3d_e)
qqPlot(h3d_e)
h3d_f<-lm(perception2 ~ riskaverse)
bptest(h3d_f)
qqPlot(h3d_f)
h3d_g<-lm(perception2 ~ test + riskaverse)
bptest(h3d_g)
qqPlot(h3d_g)
h3d_h<-lm(perception2 ~ test + riskaverse + test:riskaverse)
bptest(h3d_h)
qqPlot(h3d_h)
h3d_i<-lm(perception3 ~ test)
bptest(h3d_i)
qqPlot(h3d_i)
h3d_j<-lm(perception3 ~ riskaverse)
bptest(h3d_j)
qqPlot(h3d_j)
h3d_k<-lm(perception3 ~ test + riskaverse)
bptest(h3d_k)
qqPlot(h3d_k)
h3d_l<-lm(perception3 ~ test + riskaverse + test:riskaverse)
bptest(h3d_l)
qqPlot(h3d_l)
h3d_m<-lm(perceptionW12 ~ test)
bptest(h3d_m)
qqPlot(h3d_m)
h3d_n<-lm(perceptionW12 ~ riskaverse)
bptest(h3d_n)
qqPlot(h3d_n)
h3d_o<-lm(perceptionW12 ~ test + riskaverse)
bptest(h3d_o)
qqPlot(h3d_o)
h3d_p<-lm(perceptionW12 ~ test + riskaverse + test:riskaverse)
bptest(h3d_p)
qqPlot(h3d_p)
h3d_q<-lm(perceptionW23 ~ test)
bptest(h3d_q)
qqPlot(h3d_q)
h3d_r<-lm(perceptionW23 ~ riskaverse)
bptest(h3d_r)
qqPlot(h3d_r)
h3d_s<-lm(perceptionW23 ~ test + riskaverse)
bptest(h3d_s)
qqPlot(h3d_s)
h3d_t<-lm(perceptionW23 ~ test + riskaverse + test:riskaverse)
bptest(h3d_t)
qqPlot(h3d_t)
h3d_u<-lm(perceptionW13 ~ test)
bptest(h3d_u)
qqPlot(h3d_u)
h3d_v<-lm(perceptionW13 ~ riskaverse)
bptest(h3d_v)
qqPlot(h3d_v)
h3d_w<-lm(perceptionW13 ~ test + riskaverse)
bptest(h3d_w)
qqPlot(h3d_w)
h3d_x<-lm(perceptionW13 ~ test + riskaverse + test:riskaverse)
bptest(h3d_x)
qqPlot(h3d_x)

#############################################################################################################################################################################################

# H4 Behaviors
h4a_a<-lm(fBehave1 ~ test)
bptest(h4a_a)
qqPlot(h4a_a)
h4a_b<-lm(fBehave1 ~ conspir)
bptest(h4a_b)
qqPlot(h4a_b)
cov_h4a_b<-vcovHC(h4a_b, type="HC3")
rob_h4a_b<-sqrt(diag(cov_h4a_b))
h4a_c<-lm(fBehave1 ~ test + conspir)
bptest(h4a_c)
qqPlot(h4a_c)
cov_h4a_c<-vcovHC(h4a_c, type="HC3")
rob_h4a_c<-sqrt(diag(cov_h4a_c))
h4a_d<-lm(fBehave1 ~ test + conspir + test:conspir)
bptest(h4a_d)
qqPlot(h4a_d)
h4a_e<-lm(fBehave2 ~ test)
bptest(h4a_e)
qqPlot(h4a_e)
h4a_f<-lm(fBehave2 ~ conspir)
bptest(h4a_f)
qqPlot(h4a_f)
cov_h4a_f<-vcovHC(h4a_f, type="HC3")
rob_h4a_f<-sqrt(diag(cov_h4a_f))
h4a_g<-lm(fBehave2 ~ test + conspir)
bptest(h4a_g)
qqPlot(h4a_g)
cov_h4a_g<-vcovHC(h4a_g, type="HC3")
rob_h4a_g<-sqrt(diag(cov_h4a_g))
h4a_h<-lm(fBehave2 ~ test + conspir + test:conspir)
bptest(h4a_h)
qqPlot(h4a_h)
cov_h4a_h<-vcovHC(h4a_h, type="HC3")
rob_h4a_h<-sqrt(diag(cov_h4a_h))
h4a_i<-lm(fBehave3 ~ test)
bptest(h4a_i)
qqPlot(h4a_i)
cov_h4a_i<-vcovHC(h4a_i, type="HC3")
rob_h4a_i<-sqrt(diag(cov_h4a_i))
h4a_j<-lm(fBehave3 ~ conspir)
bptest(h4a_j)
qqPlot(h4a_j)
cov_h4a_j<-vcovHC(h4a_j, type="HC3")
rob_h4a_j<-sqrt(diag(cov_h4a_j))
h4a_k<-lm(fBehave3 ~ test + conspir)
bptest(h4a_k)
qqPlot(h4a_k)
cov_h4a_k<-vcovHC(h4a_k, type="HC3")
rob_h4a_k<-sqrt(diag(cov_h4a_k))
h4a_l<-lm(fBehave3 ~ test + conspir + test:conspir)
bptest(h4a_l)
qqPlot(h4a_l)
cov_h4a_l<-vcovHC(h4a_l, type="HC3")
rob_h4a_l<-sqrt(diag(cov_h4a_l))
h4a_m<-lm(fBehaveW12 ~ test)
bptest(h4a_m)
qqPlot(h4a_m)
cov_h4a_m<-vcovHC(h4a_m, type="HC3")
rob_h4a_m<-sqrt(diag(cov_h4a_m))
h4a_n<-lm(fBehaveW12 ~ conspir)
bptest(h4a_n)
qqPlot(h4a_n)
cov_h4a_n<-vcovHC(h4a_n, type="HC3")
rob_h4a_n<-sqrt(diag(cov_h4a_n))
h4a_o<-lm(fBehaveW12 ~ test + conspir)
bptest(h4a_o)
qqPlot(h4a_o)
cov_h4a_o<-vcovHC(h4a_o, type="HC3")
rob_h4a_o<-sqrt(diag(cov_h4a_o))
h4a_p<-lm(fBehaveW12 ~ test + conspir + test:conspir)
bptest(h4a_p)
qqPlot(h4a_p)
h4a_p<-lm(fBehaveW12 ~ test + conspir + test:conspir, data=final_data[-850,])
bptest(h4a_p)
qqPlot(h4a_p)
h4a_p<-lm(fBehaveW12 ~ test + conspir + test:conspir, data=final_data[-c(631,850),])
bptest(h4a_p)
qqPlot(h4a_p)
h4a_q<-lm(fBehaveW23 ~ test)
bptest(h4a_q)
qqPlot(h4a_q)
h4a_q<-lm(fBehaveW23 ~ test, data = final_data[-850,])
bptest(h4a_q)
qqPlot(h4a_q)
h4a_r<-lm(fBehaveW23 ~ conspir)
bptest(h4a_r)
qqPlot(h4a_r)
h4a_r<-lm(fBehaveW23 ~ conspir, data = final_data[-850,])
bptest(h4a_r)
qqPlot(h4a_r)
cov_h4a_r<-vcovHC(h4a_r, type="HC3")
rob_h4a_r<-sqrt(diag(cov_h4a_r))
h4a_s<-lm(fBehaveW23 ~ test + conspir)
bptest(h4a_s)
qqPlot(h4a_s)
h4a_s<-lm(fBehaveW23 ~ test + conspir, data = final_data[-850,])
bptest(h4a_s)
qqPlot(h4a_s)
cov_h4a_s<-vcovHC(h4a_s, type="HC3")
rob_h4a_s<-sqrt(diag(cov_h4a_s))
h4a_t<-lm(fBehaveW23 ~ test + conspir + test:conspir)
bptest(h4a_t)
qqPlot(h4a_t)
h4a_t<-lm(fBehaveW23 ~ test + conspir + test:conspir, data=final_data[-850,])
bptest(h4a_t)
qqPlot(h4a_t)
cov_h4a_t<-vcovHC(h4a_t, type="HC3")
rob_h4a_t<-sqrt(diag(cov_h4a_t))
h4a_u<-lm(fBehaveW13 ~ test)
bptest(h4a_u)
qqPlot(h4a_u)
h4a_v<-lm(fBehaveW13 ~ conspir)
bptest(h4a_v)
qqPlot(h4a_v)
h4a_w<-lm(fBehaveW13 ~ test + conspir)
bptest(h4a_w)
qqPlot(h4a_w)
h4a_x<-lm(fBehaveW13 ~ test + conspir + test:conspir)
bptest(h4a_x)
qqPlot(h4a_x)

# H4 Knowledge

h4b_a<-lm(knowledge1 ~ test)
bptest(h4b_a)
qqPlot(h4b_a)
h4b_b<-lm(knowledge1 ~ conspir)
bptest(h4b_b)
qqPlot(h4b_b)
h4b_c<-lm(knowledge1 ~ test + conspir)
bptest(h4b_c)
qqPlot(h4b_c)
h4b_d<-lm(knowledge1 ~ test + conspir + test:conspir)
bptest(h4b_d)
qqPlot(h4b_d)
h4b_e<-lm(knowledge2 ~ test)
bptest(h4b_e)
qqPlot(h4b_e)
h4b_f<-lm(knowledge2 ~ conspir)
bptest(h4b_f)
qqPlot(h4b_f)
h4b_g<-lm(knowledge2 ~ test + conspir)
bptest(h4b_g)
qqPlot(h4b_g)
h4b_h<-lm(knowledge2 ~ test + conspir + test:conspir)
bptest(h4b_h)
qqPlot(h4b_h)
h4b_i<-lm(knowledge3 ~ test)
bptest(h4b_i)
qqPlot(h4b_i)
h4b_j<-lm(knowledge3 ~ conspir)
bptest(h4b_j)
qqPlot(h4b_j)
h4b_k<-lm(knowledge3 ~ test + conspir)
bptest(h4b_k)
qqPlot(h4b_k)
h4b_l<-lm(knowledge3 ~ test + conspir + test:conspir)
bptest(h4b_l)
qqPlot(h4b_l)
h4b_m<-lm(knowledgeW12 ~ test)
bptest(h4b_m)
qqPlot(h4b_m)
h4b_n<-lm(knowledgeW12 ~ conspir)
bptest(h4b_n)
qqPlot(h4b_n)
h4b_o<-lm(knowledgeW12 ~ test + conspir)
bptest(h4b_o)
qqPlot(h4b_o)
h4b_p<-lm(knowledgeW12 ~ test + conspir + test:conspir)
bptest(h4b_p)
qqPlot(h4b_p)
h4b_q<-lm(knowledgeW23 ~ test)
bptest(h4b_q)
qqPlot(h4b_q)
h4b_r<-lm(knowledgeW23 ~ conspir)
bptest(h4b_r)
qqPlot(h4b_r)
cov_h4b_r<-vcovHC(h4b_r, type="HC3")
rob_h4b_r<-sqrt(diag(cov_h4b_r))
h4b_s<-lm(knowledgeW23 ~ test + conspir)
bptest(h4b_s)
qqPlot(h4b_s)
cov_h4b_s<-vcovHC(h4b_s, type="HC3")
rob_h4b_s<-sqrt(diag(cov_h4b_s))
h4b_t<-lm(knowledgeW23 ~ test + conspir + test:conspir)
bptest(h4b_t)
qqPlot(h4b_t)
cov_h4b_t<-vcovHC(h4b_t, type="HC3")
rob_h4b_t<-sqrt(diag(cov_h4b_t))
h4b_u<-lm(knowledgeW13 ~ test)
bptest(h4b_u)
qqPlot(h4b_u)
h4b_v<-lm(knowledgeW13 ~ conspir)
bptest(h4b_v)
qqPlot(h4b_v)
h4b_w<-lm(knowledgeW13 ~ test + conspir)
bptest(h4b_w)
qqPlot(h4b_w)
h4b_x<-lm(knowledgeW13 ~ test + conspir + test:conspir)
bptest(h4b_x)
qqPlot(h4b_x)

# H4 Attitudes

h4c_a<-lm(attitude1 ~ test)
bptest(h4c_a)
qqPlot(h4c_a)
h4c_b<-lm(attitude1 ~ conspir)
bptest(h4c_b)
qqPlot(h4c_b)
cov_h4c_b<-vcovHC(h4c_b, type="HC3")
rob_h4c_b<-sqrt(diag(cov_h4c_b))
h4c_c<-lm(attitude1 ~ test + conspir)
bptest(h4c_c)
qqPlot(h4c_c)
cov_h4c_c<-vcovHC(h4c_c, type="HC3")
rob_h4c_c<-sqrt(diag(cov_h4c_c))
h4c_d<-lm(attitude1 ~ test + conspir + test:conspir)
bptest(h4c_d)
qqPlot(h4c_d)
cov_h4c_d<-vcovHC(h4c_d, type="HC3")
rob_h4c_d<-sqrt(diag(cov_h4c_d))
h4c_e<-lm(attitude2 ~ test)
bptest(h4c_e)
qqPlot(h4c_e)
h4c_f<-lm(attitude2 ~ conspir)
bptest(h4c_f)
qqPlot(h4c_f)
h4c_g<-lm(attitude2 ~ test + conspir)
bptest(h4c_g)
qqPlot(h4c_g)
h4c_h<-lm(attitude2 ~ test + conspir + test:conspir)
bptest(h4c_h)
qqPlot(h4c_h)
h4c_i<-lm(attitude3 ~ test)
bptest(h4c_i)
qqPlot(h4c_i)
h4c_j<-lm(attitude3 ~ conspir)
bptest(h4c_j)
qqPlot(h4c_j)
cov_h4c_j<-vcovHC(h4c_j, type="HC3")
rob_h4c_j<-sqrt(diag(cov_h4c_j))
h4c_k<-lm(attitude3 ~ test + conspir)
bptest(h4c_k)
qqPlot(h4c_k)
cov_h4c_k<-vcovHC(h4c_k, type="HC3")
rob_h4c_k<-sqrt(diag(cov_h4c_k))
h4c_l<-lm(attitude3 ~ test + conspir + test:conspir)
bptest(h4c_l)
qqPlot(h4c_l)
cov_h4c_l<-vcovHC(h4c_l, type="HC3")
rob_h4c_l<-sqrt(diag(cov_h4c_l))
h4c_m<-lm(attitudeW12 ~ test)
bptest(h4c_m)
qqPlot(h4c_m)
h4c_n<-lm(attitudeW12 ~ conspir)
bptest(h4c_n)
qqPlot(h4c_n)
h4c_o<-lm(attitudeW12 ~ test + conspir)
bptest(h4c_o)
qqPlot(h4c_o)
h4c_p<-lm(attitudeW12 ~ test + conspir + test:conspir)
bptest(h4c_p)
qqPlot(h4c_p)
h4c_q<-lm(attitudeW23 ~ test)
bptest(h4c_q)
qqPlot(h4c_q)
h4c_r<-lm(attitudeW23 ~ conspir)
bptest(h4c_r)
qqPlot(h4c_r)
h4c_s<-lm(attitudeW23 ~ test + conspir)
bptest(h4c_s)
qqPlot(h4c_s)
h4c_t<-lm(attitudeW23 ~ test + conspir + test:conspir)
bptest(h4c_t)
qqPlot(h4c_t)
h4c_u<-lm(attitudeW13 ~ test)
bptest(h4c_u)
qqPlot(h4c_u)
h4c_v<-lm(attitudeW13 ~ conspir)
bptest(h4c_v)
qqPlot(h4c_v)
h4c_w<-lm(attitudeW13 ~ test + conspir)
bptest(h4c_w)
qqPlot(h4c_w)
h4c_x<-lm(attitudeW13 ~ test + conspir + test:conspir)
bptest(h4c_x)
qqPlot(h4c_x)

# H4 Perception

h4d_a<-lm(perception1 ~ test)
bptest(h4d_a)
qqPlot(h4d_a)
h4d_b<-lm(perception1 ~ conspir)
bptest(h4d_b)
qqPlot(h4d_b)
h4d_c<-lm(perception1 ~ test + conspir)
bptest(h4d_c)
qqPlot(h4d_c)
h4d_d<-lm(perception1 ~ test + conspir + test:conspir)
bptest(h4d_d)
qqPlot(h4d_d)
h4d_e<-lm(perception2 ~ test)
bptest(h4d_e)
qqPlot(h4d_e)
h4d_f<-lm(perception2 ~ conspir)
bptest(h4d_f)
qqPlot(h4d_f)
h4d_g<-lm(perception2 ~ test + conspir)
bptest(h4d_g)
qqPlot(h4d_g)
h4d_h<-lm(perception2 ~ test + conspir + test:conspir)
bptest(h4d_h)
qqPlot(h4d_h)
h4d_i<-lm(perception3 ~ test)
bptest(h4d_i)
qqPlot(h4d_i)
h4d_j<-lm(perception3 ~ conspir)
bptest(h4d_j)
qqPlot(h4d_j)
h4d_k<-lm(perception3 ~ test + conspir)
bptest(h4d_k)
qqPlot(h4d_k)
h4d_l<-lm(perception3 ~ test + conspir + test:conspir)
bptest(h4d_l)
qqPlot(h4d_l)
h4d_m<-lm(perceptionW12 ~ test)
bptest(h4d_m)
qqPlot(h4d_m)
h4d_n<-lm(perceptionW12 ~ conspir)
bptest(h4d_n)
qqPlot(h4d_n)
h4d_o<-lm(perceptionW12 ~ test + conspir)
bptest(h4d_o)
qqPlot(h4d_o)
h4d_p<-lm(perceptionW12 ~ test + conspir + test:conspir)
bptest(h4d_p)
qqPlot(h4d_p)
h4d_q<-lm(perceptionW23 ~ test)
bptest(h4d_q)
qqPlot(h4d_q)
h4d_r<-lm(perceptionW23 ~ conspir)
bptest(h4d_r)
qqPlot(h4d_r)
h4d_s<-lm(perceptionW23 ~ test + conspir)
bptest(h4d_s)
qqPlot(h4d_s)
h4d_t<-lm(perceptionW23 ~ test + conspir + test:conspir)
bptest(h4d_t)
qqPlot(h4d_t)
h4d_u<-lm(perceptionW13 ~ test)
bptest(h4d_u)
qqPlot(h4d_u)
h4d_v<-lm(perceptionW13 ~ conspir)
bptest(h4d_v)
qqPlot(h4d_v)
h4d_w<-lm(perceptionW13 ~ test + conspir)
bptest(h4d_w)
qqPlot(h4d_w)
h4d_x<-lm(perceptionW13 ~ test + conspir + test:conspir)
bptest(h4d_x)
qqPlot(h4d_x)


#############################################################################################################################################################################################



# H5 Behaviors
h5a_a<-lm(fBehave1 ~ test)
bptest(h5a_a)
qqPlot(h5a_a)
h5a_b<-lm(fBehave1 ~ soctrust)
bptest(h5a_b)
qqPlot(h5a_b)
h5a_c<-lm(fBehave1 ~ test + soctrust)
bptest(h5a_c)
qqPlot(h5a_c)
h5a_d<-lm(fBehave1 ~ test + soctrust + test:soctrust)
bptest(h5a_d)
qqPlot(h5a_d)
h5a_e<-lm(fBehave2 ~ test)
bptest(h5a_e)
qqPlot(h5a_e)
h5a_f<-lm(fBehave2 ~ soctrust)
bptest(h5a_f)
qqPlot(h5a_f)
h5a_g<-lm(fBehave2 ~ test + soctrust)
bptest(h5a_g)
qqPlot(h5a_g)
h5a_h<-lm(fBehave2 ~ test + soctrust + test:soctrust)
bptest(h5a_h)
qqPlot(h5a_h)
h5a_i<-lm(fBehave3 ~ test)
bptest(h5a_i)
qqPlot(h5a_i)
cov_h5a_i<-vcovHC(h5a_i, type="HC3")
rob_h5a_i<-sqrt(diag(cov_h5a_i))
h5a_j<-lm(fBehave3 ~ soctrust)
bptest(h5a_j)
qqPlot(h5a_j)
h5a_k<-lm(fBehave3 ~ test + soctrust)
bptest(h5a_k)
qqPlot(h5a_k)
cov_h5a_k<-vcovHC(h5a_k, type="HC3")
rob_h5a_k<-sqrt(diag(cov_h5a_k))
h5a_l<-lm(fBehave3 ~ test + soctrust + test:soctrust)
bptest(h5a_l)
qqPlot(h5a_l)
cov_h5a_l<-vcovHC(h5a_l, type="HC3")
rob_h5a_l<-sqrt(diag(cov_h5a_l))
h5a_m<-lm(fBehaveW12 ~ test)
bptest(h5a_m)
qqPlot(h5a_m)
cov_h5a_m<-vcovHC(h5a_m, type="HC3")
rob_h5a_m<-sqrt(diag(cov_h5a_m))
h5a_n<-lm(fBehaveW12 ~ soctrust)
bptest(h5a_n)
qqPlot(h5a_n)
h5a_n<-lm(fBehaveW12 ~ soctrust, data=final_data[-850,])
bptest(h5a_n)
qqPlot(h5a_n)
h5a_o<-lm(fBehaveW12 ~ test + soctrust)
bptest(h5a_o)
qqPlot(h5a_o)
h5a_o<-lm(fBehaveW12 ~ test + soctrust, data=final_data[-850,])
bptest(h5a_o)
qqPlot(h5a_o)
cov_h5a_o<-vcovHC(h5a_o, type="HC3")
rob_h5a_o<-sqrt(diag(cov_h5a_o))
h5a_p<-lm(fBehaveW12 ~ test + soctrust + test:soctrust)
bptest(h5a_p)
qqPlot(h5a_p)
h5a_p<-lm(fBehaveW12 ~ test + soctrust + test:soctrust, data=final_data[-850,])
bptest(h5a_p)
qqPlot(h5a_p)
cov_h5a_p<-vcovHC(h5a_p, type="HC3")
rob_h5a_p<-sqrt(diag(cov_h5a_p))
h5a_q<-lm(fBehaveW23 ~ test)
bptest(h5a_q)
qqPlot(h5a_q)
h5a_q<-lm(fBehaveW23 ~ test, data=final_data[-850,])
bptest(h5a_q)
qqPlot(h5a_q)
h5a_r<-lm(fBehaveW23 ~ soctrust)
bptest(h5a_r)
qqPlot(h5a_r)
h5a_r<-lm(fBehaveW23 ~ soctrust, data=final_data[-850,])
bptest(h5a_r)
qqPlot(h5a_r)
h5a_s<-lm(fBehaveW23 ~ test + soctrust)
bptest(h5a_s)
qqPlot(h5a_s)
h5a_s<-lm(fBehaveW23 ~ test + soctrust, data=final_data[-850,])
bptest(h5a_s)
qqPlot(h5a_s)
h5a_t<-lm(fBehaveW23 ~ test + soctrust + test:soctrust)
bptest(h5a_t)
qqPlot(h5a_t)
h5a_t<-lm(fBehaveW23 ~ test + soctrust + test:soctrust, data=final_data[-850,])
bptest(h5a_t)
qqPlot(h5a_t)
h5a_u<-lm(fBehaveW13 ~ test)
bptest(h5a_u)
qqPlot(h5a_u)
h5a_v<-lm(fBehaveW13 ~ soctrust)
bptest(h5a_v)
qqPlot(h5a_v)
h5a_w<-lm(fBehaveW13 ~ test + soctrust)
bptest(h5a_w)
qqPlot(h5a_w)
h5a_x<-lm(fBehaveW13 ~ test + soctrust + test:soctrust)
bptest(h5a_x)
qqPlot(h5a_x)

# H5 Knowledge

h5b_a<-lm(knowledge1 ~ test)
bptest(h5b_a)
qqPlot(h5b_a)
h5b_b<-lm(knowledge1 ~ soctrust)
bptest(h5b_b)
qqPlot(h5b_b)
cov_h5b_b<-vcovHC(h5b_b, type="HC3")
rob_h5b_b<-sqrt(diag(cov_h5b_b))
h5b_c<-lm(knowledge1 ~ test + soctrust)
bptest(h5b_c)
qqPlot(h5b_c)
cov_h5b_c<-vcovHC(h5b_c, type="HC3")
rob_h5b_c<-sqrt(diag(cov_h5b_c))
h5b_d<-lm(knowledge1 ~ test + soctrust + test:soctrust)
bptest(h5b_d)
qqPlot(h5b_d)
cov_h5b_d<-vcovHC(h5b_d, type="HC3")
rob_h5b_d<-sqrt(diag(cov_h5b_d))
h5b_e<-lm(knowledge2 ~ test)
bptest(h5b_e)
qqPlot(h5b_e)
h5b_f<-lm(knowledge2 ~ soctrust)
bptest(h5b_f)
qqPlot(h5b_f)
h5b_g<-lm(knowledge2 ~ test + soctrust)
bptest(h5b_g)
qqPlot(h5b_g)
h5b_h<-lm(knowledge2 ~ test + soctrust + test:soctrust)
bptest(h5b_h)
qqPlot(h5b_h)
h5b_i<-lm(knowledge3 ~ test)
bptest(h5b_i)
qqPlot(h5b_i)
h5b_j<-lm(knowledge3 ~ soctrust)
bptest(h5b_j)
qqPlot(h5b_j)
h5b_k<-lm(knowledge3 ~ test + soctrust)
bptest(h5b_k)
qqPlot(h5b_k)
h5b_l<-lm(knowledge3 ~ test + soctrust + test:soctrust)
bptest(h5b_l)
qqPlot(h5b_l)
h5b_m<-lm(knowledgeW12 ~ test)
bptest(h5b_m)
qqPlot(h5b_m)
h5b_n<-lm(knowledgeW12 ~ soctrust)
bptest(h5b_n)
qqPlot(h5b_n)
h5b_o<-lm(knowledgeW12 ~ test + soctrust)
bptest(h5b_o)
qqPlot(h5b_o)
h5b_p<-lm(knowledgeW12 ~ test + soctrust + test:soctrust)
bptest(h5b_p)
qqPlot(h5b_p)
h5b_q<-lm(knowledgeW23 ~ test)
bptest(h5b_q)
qqPlot(h5b_q)
h5b_r<-lm(knowledgeW23 ~ soctrust)
bptest(h5b_r)
qqPlot(h5b_r)
h5b_s<-lm(knowledgeW23 ~ test + soctrust)
bptest(h5b_s)
qqPlot(h5b_s)
h5b_t<-lm(knowledgeW23 ~ test + soctrust + test:soctrust)
bptest(h5b_t)
qqPlot(h5b_t)
h5b_u<-lm(knowledgeW13 ~ test)
bptest(h5b_u)
qqPlot(h5b_u)
h5b_v<-lm(knowledgeW13 ~ soctrust)
bptest(h5b_v)
qqPlot(h5b_v)
h5b_w<-lm(knowledgeW13 ~ test + soctrust)
bptest(h5b_w)
qqPlot(h5b_w)
h5b_x<-lm(knowledgeW13 ~ test + soctrust + test:soctrust)
bptest(h5b_x)
qqPlot(h5b_x)

# H5 Attitudes

h5c_a<-lm(attitude1 ~ test)
bptest(h5c_a)
qqPlot(h5c_a)
h5c_b<-lm(attitude1 ~ soctrust)
bptest(h5c_b)
qqPlot(h5c_b)
h5c_c<-lm(attitude1 ~ test + soctrust)
bptest(h5c_c)
qqPlot(h5c_c)
h5c_d<-lm(attitude1 ~ test + soctrust + test:soctrust)
bptest(h5c_d)
qqPlot(h5c_d)
h5c_e<-lm(attitude2 ~ test)
bptest(h5c_e)
qqPlot(h5c_e)
h5c_f<-lm(attitude2 ~ soctrust)
bptest(h5c_f)
qqPlot(h5c_f)
h5c_g<-lm(attitude2 ~ test + soctrust)
bptest(h5c_g)
qqPlot(h5c_g)
h5c_h<-lm(attitude2 ~ test + soctrust + test:soctrust)
bptest(h5c_h)
qqPlot(h5c_h)
h5c_i<-lm(attitude3 ~ test)
bptest(h5c_i)
qqPlot(h5c_i)
h5c_j<-lm(attitude3 ~ soctrust)
bptest(h5c_j)
qqPlot(h5c_j)
cov_h5c_j<-vcovHC(h5c_j, type="HC3")
rob_h5c_j<-sqrt(diag(cov_h5c_j))
h5c_k<-lm(attitude3 ~ test + soctrust)
bptest(h5c_k)
qqPlot(h5c_k)
cov_h5c_k<-vcovHC(h5c_k, type="HC3")
rob_h5c_k<-sqrt(diag(cov_h5c_k))
h5c_l<-lm(attitude3 ~ test + soctrust + test:soctrust)
bptest(h5c_l)
qqPlot(h5c_l)
h5c_m<-lm(attitudeW12 ~ test)
bptest(h5c_m)
qqPlot(h5c_m)
h5c_n<-lm(attitudeW12 ~ soctrust)
bptest(h5c_n)
qqPlot(h5c_n)
cov_h5c_n<-vcovHC(h5c_n, type="HC3")
rob_h5c_n<-sqrt(diag(cov_h5c_n))
h5c_o<-lm(attitudeW12 ~ test + soctrust)
bptest(h5c_o)
qqPlot(h5c_o)
h5c_p<-lm(attitudeW12 ~ test + soctrust + test:soctrust)
bptest(h5c_p)
qqPlot(h5c_p)
h5c_q<-lm(attitudeW23 ~ test)
bptest(h5c_q)
qqPlot(h5c_q)
h5c_r<-lm(attitudeW23 ~ soctrust)
bptest(h5c_r)
qqPlot(h5c_r)
h5c_s<-lm(attitudeW23 ~ test + soctrust)
bptest(h5c_s)
qqPlot(h5c_s)
h5c_t<-lm(attitudeW23 ~ test + soctrust + test:soctrust)
bptest(h5c_t)
qqPlot(h5c_t)
h5c_u<-lm(attitudeW13 ~ test)
bptest(h5c_u)
qqPlot(h5c_u)
h5c_v<-lm(attitudeW13 ~ soctrust)
bptest(h5c_v)
qqPlot(h5c_v)
h5c_w<-lm(attitudeW13 ~ test + soctrust)
bptest(h5c_w)
qqPlot(h5c_w)
h5c_x<-lm(attitudeW13 ~ test + soctrust + test:soctrust)
bptest(h5c_x)
qqPlot(h5c_x)

# H5 Perception

h5d_a<-lm(perception1 ~ test)
bptest(h5d_a)
qqPlot(h5d_a)
h5d_b<-lm(perception1 ~ soctrust)
bptest(h5d_b)
qqPlot(h5d_b)
cov_h5d_b<-vcovHC(h5d_b, type="HC3")
rob_h5d_b<-sqrt(diag(cov_h5d_b))
h5d_c<-lm(perception1 ~ test + soctrust)
bptest(h5d_c)
qqPlot(h5d_c)
cov_h5d_c<-vcovHC(h5d_c, type="HC3")
rob_h5d_c<-sqrt(diag(cov_h5d_c))
h5d_d<-lm(perception1 ~ test + soctrust + test:soctrust)
bptest(h5d_d)
qqPlot(h5d_d)
h5d_e<-lm(perception2 ~ test)
bptest(h5d_e)
qqPlot(h5d_e)
h5d_f<-lm(perception2 ~ soctrust)
bptest(h5d_f)
qqPlot(h5d_f)
h5d_g<-lm(perception2 ~ test + soctrust)
bptest(h5d_g)
qqPlot(h5d_g)
h5d_h<-lm(perception2 ~ test + soctrust + test:soctrust)
bptest(h5d_h)
qqPlot(h5d_h)
h5d_i<-lm(perception3 ~ test)
bptest(h5d_i)
qqPlot(h5d_i)
h5d_j<-lm(perception3 ~ soctrust)
bptest(h5d_j)
qqPlot(h5d_j)
cov_h5d_j<-vcovHC(h5d_j, type="HC3")
rob_h5d_j<-sqrt(diag(cov_h5d_j))
h5d_k<-lm(perception3 ~ test + soctrust)
bptest(h5d_k)
qqPlot(h5d_k)
h5d_l<-lm(perception3 ~ test + soctrust + test:soctrust)
bptest(h5d_l)
qqPlot(h5d_l)
h5d_m<-lm(perceptionW12 ~ test)
bptest(h5d_m)
qqPlot(h5d_m)
h5d_n<-lm(perceptionW12 ~ soctrust)
bptest(h5d_n)
qqPlot(h5d_n)
h5d_o<-lm(perceptionW12 ~ test + soctrust)
bptest(h5d_o)
qqPlot(h5d_o)
h5d_p<-lm(perceptionW12 ~ test + soctrust + test:soctrust)
bptest(h5d_p)
qqPlot(h5d_p)
h5d_q<-lm(perceptionW23 ~ test)
bptest(h5d_q)
qqPlot(h5d_q)
h5d_r<-lm(perceptionW23 ~ soctrust)
bptest(h5d_r)
qqPlot(h5d_r)
h5d_s<-lm(perceptionW23 ~ test + soctrust)
bptest(h5d_s)
qqPlot(h5d_s)
h5d_t<-lm(perceptionW23 ~ test + soctrust + test:soctrust)
bptest(h5d_t)
qqPlot(h5d_t)
h5d_u<-lm(perceptionW13 ~ test)
bptest(h5d_u)
qqPlot(h5d_u)
h5d_v<-lm(perceptionW13 ~ soctrust)
bptest(h5d_v)
qqPlot(h5d_v)
h5d_w<-lm(perceptionW13 ~ test + soctrust)
bptest(h5d_w)
qqPlot(h5d_w)
h5d_x<-lm(perceptionW13 ~ test + soctrust + test:soctrust)
bptest(h5d_x)
qqPlot(h5d_x)

#############################################################################################################################################################################################

# h6a_ Behaviors
h6a_a_a<-lm(fBehave1 ~ test)
bptest(h6a_a_a)
qqPlot(h6a_a_a)
h6a_a_b<-lm(fBehave1 ~ instiTrustNational)
bptest(h6a_a_b)
qqPlot(h6a_a_b)
cov_h6a_a_b<-vcovHC(h6a_a_b, type="HC3")
rob_h6a_a_b<-sqrt(diag(cov_h6a_a_b))
h6a_a_c<-lm(fBehave1 ~ test + instiTrustNational)
bptest(h6a_a_c)
qqPlot(h6a_a_c)
cov_h6a_a_c<-vcovHC(h6a_a_c, type="HC3")
rob_h6a_a_c<-sqrt(diag(cov_h6a_a_c))
h6a_a_d<-lm(fBehave1 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_d)
qqPlot(h6a_a_d)
cov_h6a_a_d<-vcovHC(h6a_a_d, type="HC3")
rob_h6a_a_d<-sqrt(diag(cov_h6a_a_d))
h6a_a_e<-lm(fBehave2 ~ test)
bptest(h6a_a_e)
qqPlot(h6a_a_e)
h6a_a_f<-lm(fBehave2 ~ instiTrustNational)
bptest(h6a_a_f)
qqPlot(h6a_a_f)
cov_h6a_a_f<-vcovHC(h6a_a_f, type="HC3")
rob_h6a_a_f<-sqrt(diag(cov_h6a_a_f))
h6a_a_g<-lm(fBehave2 ~ test + instiTrustNational)
bptest(h6a_a_g)
qqPlot(h6a_a_g)
cov_h6a_a_g<-vcovHC(h6a_a_g, type="HC3")
rob_h6a_a_g<-sqrt(diag(cov_h6a_a_g))
h6a_a_h<-lm(fBehave2 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_h)
qqPlot(h6a_a_h)
cov_h6a_a_h<-vcovHC(h6a_a_h, type="HC3")
rob_h6a_a_h<-sqrt(diag(cov_h6a_a_h))
h6a_a_i<-lm(fBehave3 ~ test)
bptest(h6a_a_i)
qqPlot(h6a_a_i)
cov_h6a_a_i<-vcovHC(h6a_a_i, type="HC3")
rob_h6a_a_i<-sqrt(diag(cov_h6a_a_i))
h6a_a_j<-lm(fBehave3 ~ instiTrustNational)
bptest(h6a_a_j)
qqPlot(h6a_a_j)
cov_h6a_a_j<-vcovHC(h6a_a_j, type="HC3")
rob_h6a_a_j<-sqrt(diag(cov_h6a_a_j))
h6a_a_k<-lm(fBehave3 ~ test + instiTrustNational)
bptest(h6a_a_k)
qqPlot(h6a_a_k)
cov_h6a_a_k<-vcovHC(h6a_a_k, type="HC3")
rob_h6a_a_k<-sqrt(diag(cov_h6a_a_k))
h6a_a_l<-lm(fBehave3 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_l)
qqPlot(h6a_a_l)
cov_h6a_a_l<-vcovHC(h6a_a_l, type="HC3")
rob_h6a_a_l<-sqrt(diag(cov_h6a_a_l))
h6a_a_m<-lm(fBehaveW12 ~ test)
bptest(h6a_a_m)
qqPlot(h6a_a_m)
cov_h6a_a_m<-vcovHC(h6a_a_m, type="HC3")
rob_h6a_a_m<-sqrt(diag(cov_h6a_a_m))
h6a_a_n<-lm(fBehaveW12 ~ instiTrustNational)
bptest(h6a_a_n)
qqPlot(h6a_a_n)
h6a_a_o<-lm(fBehaveW12 ~ test + instiTrustNational)
bptest(h6a_a_o)
qqPlot(h6a_a_o)
cov_h6a_a_o<-vcovHC(h6a_a_o, type="HC3")
rob_h6a_a_o<-sqrt(diag(cov_h6a_a_o))
h6a_a_p<-lm(fBehaveW12 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_p)
qqPlot(h6a_a_p, reps=1000)
cov_h6a_a_p<-vcovHC(h6a_a_p, type="HC3")
rob_h6a_a_p<-sqrt(diag(cov_h6a_a_p))
h6a_a_q<-lm(fBehaveW23 ~ test)
bptest(h6a_a_q)
qqPlot(h6a_a_q)
h6a_a_q<-lm(fBehaveW23 ~ test, data=final_data[-850,])
bptest(h6a_a_q)
qqPlot(h6a_a_q)
h6a_a_r<-lm(fBehaveW23 ~ instiTrustNational)
bptest(h6a_a_r)
qqPlot(h6a_a_r)
h6a_a_r<-lm(fBehaveW23 ~ instiTrustNational, data=final_data[-850,])
bptest(h6a_a_r)
qqPlot(h6a_a_r)
h6a_a_s<-lm(fBehaveW23 ~ test + instiTrustNational)
bptest(h6a_a_s)
qqPlot(h6a_a_s)
h6a_a_s<-lm(fBehaveW23 ~ test + instiTrustNational, data=final_data[-850,])
bptest(h6a_a_s)
qqPlot(h6a_a_s)
h6a_a_t<-lm(fBehaveW23 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_t)
qqPlot(h6a_a_t)
h6a_a_t<-lm(fBehaveW23 ~ test + instiTrustNational + test:instiTrustNational, data = final_data[-850,])
bptest(h6a_a_t)
qqPlot(h6a_a_t)
h6a_a_u<-lm(fBehaveW13 ~ test)
bptest(h6a_a_u)
qqPlot(h6a_a_u)
h6a_a_v<-lm(fBehaveW13 ~ instiTrustNational)
bptest(h6a_a_v)
qqPlot(h6a_a_v)
h6a_a_w<-lm(fBehaveW13 ~ test + instiTrustNational)
bptest(h6a_a_w)
qqPlot(h6a_a_w)
h6a_a_x<-lm(fBehaveW13 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_a_x)
qqPlot(h6a_a_x)

# h6a_ Knowledge

h6a_b_a<-lm(knowledge1 ~ test)
bptest(h6a_b_a)
qqPlot(h6a_b_a)
h6a_b_b<-lm(knowledge1 ~ instiTrustNational)
bptest(h6a_b_b)
qqPlot(h6a_b_b)
h6a_b_c<-lm(knowledge1 ~ test + instiTrustNational)
bptest(h6a_b_c)
qqPlot(h6a_b_c)
h6a_b_d<-lm(knowledge1 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_d)
qqPlot(h6a_b_d)
h6a_b_e<-lm(knowledge2 ~ test)
bptest(h6a_b_e)
qqPlot(h6a_b_e)
h6a_b_f<-lm(knowledge2 ~ instiTrustNational)
bptest(h6a_b_f)
qqPlot(h6a_b_f)
cov_h6a_b_f<-vcovHC(h6a_b_f, type="HC3")
rob_h6a_b_f<-sqrt(diag(cov_h6a_b_f))
h6a_b_g<-lm(knowledge2 ~ test + instiTrustNational)
bptest(h6a_b_g)
qqPlot(h6a_b_g)
cov_h6a_b_g<-vcovHC(h6a_b_g, type="HC3")
rob_h6a_b_g<-sqrt(diag(cov_h6a_b_g))
h6a_b_h<-lm(knowledge2 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_h)
qqPlot(h6a_b_h)
cov_h6a_b_h<-vcovHC(h6a_b_h, type="HC3")
rob_h6a_b_h<-sqrt(diag(cov_h6a_b_h))
h6a_b_i<-lm(knowledge3 ~ test)
bptest(h6a_b_i)
qqPlot(h6a_b_i)
h6a_b_j<-lm(knowledge3 ~ instiTrustNational)
bptest(h6a_b_j)
qqPlot(h6a_b_j)
h6a_b_k<-lm(knowledge3 ~ test + instiTrustNational)
bptest(h6a_b_k)
qqPlot(h6a_b_k)
h6a_b_l<-lm(knowledge3 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_l)
qqPlot(h6a_b_l)
h6a_b_m<-lm(knowledgeW12 ~ test)
bptest(h6a_b_m)
qqPlot(h6a_b_m)
h6a_b_n<-lm(knowledgeW12 ~ instiTrustNational)
bptest(h6a_b_n)
qqPlot(h6a_b_n)
h6a_b_o<-lm(knowledgeW12 ~ test + instiTrustNational)
bptest(h6a_b_o)
qqPlot(h6a_b_o)
h6a_b_p<-lm(knowledgeW12 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_p)
qqPlot(h6a_b_p)
h6a_b_q<-lm(knowledgeW23 ~ test)
bptest(h6a_b_q)
qqPlot(h6a_b_q)
h6a_b_r<-lm(knowledgeW23 ~ instiTrustNational)
bptest(h6a_b_r)
qqPlot(h6a_b_r)
h6a_b_s<-lm(knowledgeW23 ~ test + instiTrustNational)
bptest(h6a_b_s)
qqPlot(h6a_b_s)
h6a_b_t<-lm(knowledgeW23 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_t)
qqPlot(h6a_b_t)
h6a_b_u<-lm(knowledgeW13 ~ test)
bptest(h6a_b_u)
qqPlot(h6a_b_u)
h6a_b_v<-lm(knowledgeW13 ~ instiTrustNational)
bptest(h6a_b_v)
qqPlot(h6a_b_v)
h6a_b_w<-lm(knowledgeW13 ~ test + instiTrustNational)
bptest(h6a_b_w)
qqPlot(h6a_b_w)
h6a_b_x<-lm(knowledgeW13 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_b_x)
qqPlot(h6a_b_x)

# h6a_ Attitudes

h6a_c_a<-lm(attitude1 ~ test)
bptest(h6a_c_a)
qqPlot(h6a_c_a)
h6a_c_b<-lm(attitude1 ~ instiTrustNational)
bptest(h6a_c_b)
qqPlot(h6a_c_b)
cov_h6a_c_b<-vcovHC(h6a_c_b, type="HC3")
rob_h6a_c_b<-sqrt(diag(cov_h6a_c_b))
h6a_c_c<-lm(attitude1 ~ test + instiTrustNational)
bptest(h6a_c_c)
qqPlot(h6a_c_c)
cov_h6a_c_c<-vcovHC(h6a_c_c, type="HC3")
rob_h6a_c_c<-sqrt(diag(cov_h6a_c_c))
h6a_c_d<-lm(attitude1 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_d)
qqPlot(h6a_c_d)
cov_h6a_c_d<-vcovHC(h6a_c_d, type="HC3")
rob_h6a_c_d<-sqrt(diag(cov_h6a_c_d))
h6a_c_e<-lm(attitude2 ~ test)
bptest(h6a_c_e)
qqPlot(h6a_c_e)
h6a_c_f<-lm(attitude2 ~ instiTrustNational)
bptest(h6a_c_f)
qqPlot(h6a_c_f)
cov_h6a_c_f<-vcovHC(h6a_c_f, type="HC3")
rob_h6a_c_f<-sqrt(diag(cov_h6a_c_f))
h6a_c_g<-lm(attitude2 ~ test + instiTrustNational)
bptest(h6a_c_g)
qqPlot(h6a_c_g)
cov_h6a_c_g<-vcovHC(h6a_c_g, type="HC3")
rob_h6a_c_g<-sqrt(diag(cov_h6a_c_g))
h6a_c_h<-lm(attitude2 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_h)
qqPlot(h6a_c_h)
cov_h6a_c_h<-vcovHC(h6a_c_h, type="HC3")
rob_h6a_c_h<-sqrt(diag(cov_h6a_c_h))
h6a_c_i<-lm(attitude3 ~ test)
bptest(h6a_c_i)
qqPlot(h6a_c_i)
h6a_c_j<-lm(attitude3 ~ instiTrustNational)
bptest(h6a_c_j)
qqPlot(h6a_c_j)
cov_h6a_c_j<-vcovHC(h6a_c_j, type="HC3")
rob_h6a_c_j<-sqrt(diag(cov_h6a_c_j))
h6a_c_k<-lm(attitude3 ~ test + instiTrustNational)
bptest(h6a_c_k)
qqPlot(h6a_c_k)
cov_h6a_c_k<-vcovHC(h6a_c_k, type="HC3")
rob_h6a_c_k<-sqrt(diag(cov_h6a_c_k))
h6a_c_l<-lm(attitude3 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_l)
qqPlot(h6a_c_l)
cov_h6a_c_l<-vcovHC(h6a_c_l, type="HC3")
rob_h6a_c_l<-sqrt(diag(cov_h6a_c_l))
h6a_c_m<-lm(attitudeW12 ~ test)
bptest(h6a_c_m)
qqPlot(h6a_c_m)
h6a_c_n<-lm(attitudeW12 ~ instiTrustNational)
bptest(h6a_c_n)
qqPlot(h6a_c_n)
h6a_c_o<-lm(attitudeW12 ~ test + instiTrustNational)
bptest(h6a_c_o)
qqPlot(h6a_c_o)
h6a_c_p<-lm(attitudeW12 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_p)
qqPlot(h6a_c_p)
h6a_c_q<-lm(attitudeW23 ~ test)
bptest(h6a_c_q)
qqPlot(h6a_c_q)
h6a_c_r<-lm(attitudeW23 ~ instiTrustNational)
bptest(h6a_c_r)
qqPlot(h6a_c_r)
h6a_c_s<-lm(attitudeW23 ~ test + instiTrustNational)
bptest(h6a_c_s)
qqPlot(h6a_c_s)
h6a_c_t<-lm(attitudeW23 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_t)
qqPlot(h6a_c_t)
h6a_c_u<-lm(attitudeW13 ~ test)
bptest(h6a_c_u)
qqPlot(h6a_c_u)
h6a_c_v<-lm(attitudeW13 ~ instiTrustNational)
bptest(h6a_c_v)
qqPlot(h6a_c_v)
h6a_c_w<-lm(attitudeW13 ~ test + instiTrustNational)
bptest(h6a_c_w)
qqPlot(h6a_c_w)
h6a_c_x<-lm(attitudeW13 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_c_x)
qqPlot(h6a_c_x)

# h6a_ Perception

h6a_d_a<-lm(perception1 ~ test)
bptest(h6a_d_a)
qqPlot(h6a_d_a)
h6a_d_b<-lm(perception1 ~ instiTrustNational)
bptest(h6a_d_b)
qqPlot(h6a_d_b)
h6a_d_c<-lm(perception1 ~ test + instiTrustNational)
bptest(h6a_d_c)
qqPlot(h6a_d_c)
h6a_d_d<-lm(perception1 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_d)
qqPlot(h6a_d_d)
h6a_d_e<-lm(perception2 ~ test)
bptest(h6a_d_e)
qqPlot(h6a_d_e)
h6a_d_f<-lm(perception2 ~ instiTrustNational)
bptest(h6a_d_f)
qqPlot(h6a_d_f)
h6a_d_g<-lm(perception2 ~ test + instiTrustNational)
bptest(h6a_d_g)
qqPlot(h6a_d_g)
h6a_d_h<-lm(perception2 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_h)
qqPlot(h6a_d_h)
h6a_d_i<-lm(perception3 ~ test)
bptest(h6a_d_i)
qqPlot(h6a_d_i)
h6a_d_j<-lm(perception3 ~ instiTrustNational)
bptest(h6a_d_j)
qqPlot(h6a_d_j)
h6a_d_k<-lm(perception3 ~ test + instiTrustNational)
bptest(h6a_d_k)
qqPlot(h6a_d_k)
h6a_d_l<-lm(perception3 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_l)
qqPlot(h6a_d_l)
h6a_d_m<-lm(perceptionW12 ~ test)
bptest(h6a_d_m)
qqPlot(h6a_d_m)
h6a_d_n<-lm(perceptionW12 ~ instiTrustNational)
bptest(h6a_d_n)
qqPlot(h6a_d_n)
h6a_d_o<-lm(perceptionW12 ~ test + instiTrustNational)
bptest(h6a_d_o)
qqPlot(h6a_d_o)
h6a_d_p<-lm(perceptionW12 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_p)
qqPlot(h6a_d_p)
h6a_d_q<-lm(perceptionW23 ~ test)
bptest(h6a_d_q)
qqPlot(h6a_d_q)
h6a_d_r<-lm(perceptionW23 ~ instiTrustNational)
bptest(h6a_d_r)
qqPlot(h6a_d_r)
h6a_d_s<-lm(perceptionW23 ~ test + instiTrustNational)
bptest(h6a_d_s)
qqPlot(h6a_d_s)
h6a_d_t<-lm(perceptionW23 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_t)
qqPlot(h6a_d_t)
h6a_d_u<-lm(perceptionW13 ~ test)
bptest(h6a_d_u)
qqPlot(h6a_d_u)
h6a_d_v<-lm(perceptionW13 ~ instiTrustNational)
bptest(h6a_d_v)
qqPlot(h6a_d_v)
h6a_d_w<-lm(perceptionW13 ~ test + instiTrustNational)
bptest(h6a_d_w)
qqPlot(h6a_d_w)
h6a_d_x<-lm(perceptionW13 ~ test + instiTrustNational + test:instiTrustNational)
bptest(h6a_d_x)
qqPlot(h6a_d_x)


#############################################################################################################################################################################################

# h6b_ Behaviors
h6b_a_a<-lm(fBehave1 ~ test)
bptest(h6b_a_a)
qqPlot(h6b_a_a)
h6b_a_b<-lm(fBehave1 ~ instiTrustGeorgia)
bptest(h6b_a_b)
qqPlot(h6b_a_b)
cov_h6b_a_b<-vcovHC(h6b_a_b, type="HC3")
rob_h6b_a_b<-sqrt(diag(cov_h6b_a_b))
h6b_a_c<-lm(fBehave1 ~ test + instiTrustGeorgia)
bptest(h6b_a_c)
qqPlot(h6b_a_c)
cov_h6b_a_c<-vcovHC(h6b_a_c, type="HC3")
rob_h6b_a_c<-sqrt(diag(cov_h6b_a_c))
h6b_a_d<-lm(fBehave1 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_d)
qqPlot(h6b_a_d)
cov_h6b_a_d<-vcovHC(h6b_a_d, type="HC3")
rob_h6b_a_d<-sqrt(diag(cov_h6b_a_d))
h6b_a_e<-lm(fBehave2 ~ test)
bptest(h6b_a_e)
qqPlot(h6b_a_e)
h6b_a_f<-lm(fBehave2 ~ instiTrustGeorgia)
bptest(h6b_a_f)
qqPlot(h6b_a_f)
cov_h6b_a_f<-vcovHC(h6b_a_f, type="HC3")
rob_h6b_a_f<-sqrt(diag(cov_h6b_a_f))
h6b_a_g<-lm(fBehave2 ~ test + instiTrustGeorgia)
bptest(h6b_a_g)
qqPlot(h6b_a_g)
cov_h6b_a_g<-vcovHC(h6b_a_g, type="HC3")
rob_h6b_a_g<-sqrt(diag(cov_h6b_a_g))
h6b_a_h<-lm(fBehave2 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_h)
qqPlot(h6b_a_h)
cov_h6b_a_h<-vcovHC(h6b_a_h, type="HC3")
rob_h6b_a_h<-sqrt(diag(cov_h6b_a_h))
h6b_a_i<-lm(fBehave3 ~ test)
bptest(h6b_a_i)
qqPlot(h6b_a_i)
cov_h6b_a_i<-vcovHC(h6b_a_i, type="HC3")
rob_h6b_a_i<-sqrt(diag(cov_h6b_a_i))
h6b_a_j<-lm(fBehave3 ~ instiTrustGeorgia)
bptest(h6b_a_j)
qqPlot(h6b_a_j)
cov_h6b_a_j<-vcovHC(h6b_a_j, type="HC3")
rob_h6b_a_j<-sqrt(diag(cov_h6b_a_j))
h6b_a_k<-lm(fBehave3 ~ test + instiTrustGeorgia)
bptest(h6b_a_k)
qqPlot(h6b_a_k)
cov_h6b_a_k<-vcovHC(h6b_a_k, type="HC3")
rob_h6b_a_k<-sqrt(diag(cov_h6b_a_k))
h6b_a_l<-lm(fBehave3 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_l)
qqPlot(h6b_a_l)
cov_h6b_a_l<-vcovHC(h6b_a_l, type="HC3")
rob_h6b_a_l<-sqrt(diag(cov_h6b_a_l))
h6b_a_m<-lm(fBehaveW12 ~ test)
bptest(h6b_a_m)
qqPlot(h6b_a_m)
cov_h6b_a_m<-vcovHC(h6b_a_m, type="HC3")
rob_h6b_a_m<-sqrt(diag(cov_h6b_a_m))
h6b_a_n<-lm(fBehaveW12 ~ instiTrustGeorgia)
bptest(h6b_a_n)
qqPlot(h6b_a_n)
h6b_a_o<-lm(fBehaveW12 ~ test + instiTrustGeorgia)
bptest(h6b_a_o)
qqPlot(h6b_a_o)
h6b_a_p<-lm(fBehaveW12 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_p)
qqPlot(h6b_a_p)
cov_h6b_a_p<-vcovHC(h6b_a_p, type="HC3")
rob_h6b_a_p<-sqrt(diag(cov_h6b_a_p))
h6b_a_q<-lm(fBehaveW23 ~ test)
bptest(h6b_a_q)
qqPlot(h6b_a_q)
h6b_a_q<-lm(fBehaveW23 ~ test, data=final_data[-850,])
bptest(h6b_a_q)
qqPlot(h6b_a_q)
h6b_a_r<-lm(fBehaveW23 ~ instiTrustGeorgia)
bptest(h6b_a_r)
qqPlot(h6b_a_r)
h6b_a_r<-lm(fBehaveW23 ~ instiTrustGeorgia, data=final_data[-850,])
bptest(h6b_a_r)
qqPlot(h6b_a_r)
h6b_a_s<-lm(fBehaveW23 ~ test + instiTrustGeorgia)
bptest(h6b_a_s)
qqPlot(h6b_a_s)
h6b_a_s<-lm(fBehaveW23 ~ test + instiTrustGeorgia, data=final_data[-850,])
bptest(h6b_a_s)
qqPlot(h6b_a_s)
h6b_a_t<-lm(fBehaveW23 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_t)
qqPlot(h6b_a_t)
h6b_a_t<-lm(fBehaveW23 ~ test + instiTrustGeorgia + test:instiTrustGeorgia, data=final_data[-850,])
bptest(h6b_a_t)
qqPlot(h6b_a_t)
h6b_a_u<-lm(fBehaveW13 ~ test)
bptest(h6b_a_u)
qqPlot(h6b_a_u)
h6b_a_v<-lm(fBehaveW13 ~ instiTrustGeorgia)
bptest(h6b_a_v)
qqPlot(h6b_a_v)
h6b_a_w<-lm(fBehaveW13 ~ test + instiTrustGeorgia)
bptest(h6b_a_w)
qqPlot(h6b_a_w)
h6b_a_x<-lm(fBehaveW13 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_a_x)
qqPlot(h6b_a_x)

# h6b_ Knowledge

h6b_b_a<-lm(knowledge1 ~ test)
bptest(h6b_b_a)
qqPlot(h6b_b_a)
h6b_b_b<-lm(knowledge1 ~ instiTrustGeorgia)
bptest(h6b_b_b)
qqPlot(h6b_b_b)
h6b_b_c<-lm(knowledge1 ~ test + instiTrustGeorgia)
bptest(h6b_b_c)
qqPlot(h6b_b_c)
h6b_b_d<-lm(knowledge1 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_d)
qqPlot(h6b_b_d)
h6b_b_e<-lm(knowledge2 ~ test)
bptest(h6b_b_e)
qqPlot(h6b_b_e)
h6b_b_f<-lm(knowledge2 ~ instiTrustGeorgia)
bptest(h6b_b_f)
qqPlot(h6b_b_f)
cov_h6b_b_f<-vcovHC(h6b_b_f, type="HC3")
rob_h6b_b_f<-sqrt(diag(cov_h6b_b_f))
h6b_b_g<-lm(knowledge2 ~ test + instiTrustGeorgia)
bptest(h6b_b_g)
qqPlot(h6b_b_g)
cov_h6b_b_g<-vcovHC(h6b_b_g, type="HC3")
rob_h6b_b_g<-sqrt(diag(cov_h6b_b_g))
h6b_b_h<-lm(knowledge2 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_h)
qqPlot(h6b_b_h)
cov_h6b_b_h<-vcovHC(h6b_b_h, type="HC3")
rob_h6b_b_h<-sqrt(diag(cov_h6b_b_h))
h6b_b_i<-lm(knowledge3 ~ test)
bptest(h6b_b_i)
qqPlot(h6b_b_i)
h6b_b_j<-lm(knowledge3 ~ instiTrustGeorgia)
bptest(h6b_b_j)
qqPlot(h6b_b_j)
h6b_b_k<-lm(knowledge3 ~ test + instiTrustGeorgia)
bptest(h6b_b_k)
qqPlot(h6b_b_k)
h6b_b_l<-lm(knowledge3 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_l)
qqPlot(h6b_b_l)
h6b_b_m<-lm(knowledgeW12 ~ test)
bptest(h6b_b_m)
qqPlot(h6b_b_m)
h6b_b_n<-lm(knowledgeW12 ~ instiTrustGeorgia)
bptest(h6b_b_n)
qqPlot(h6b_b_n)
h6b_b_o<-lm(knowledgeW12 ~ test + instiTrustGeorgia)
bptest(h6b_b_o)
qqPlot(h6b_b_o)
h6b_b_p<-lm(knowledgeW12 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_p)
qqPlot(h6b_b_p)
cov_h6b_b_p<-vcovHC(h6b_b_p, type="HC3")
rob_h6b_b_p<-sqrt(diag(cov_h6b_b_p))
h6b_b_q<-lm(knowledgeW23 ~ test)
bptest(h6b_b_q)
qqPlot(h6b_b_q)
h6b_b_r<-lm(knowledgeW23 ~ instiTrustGeorgia)
bptest(h6b_b_r)
qqPlot(h6b_b_r)
h6b_b_r<-lm(knowledgeW23 ~ instiTrustGeorgia, data=final_data[-850,])
bptest(h6b_b_r)
qqPlot(h6b_b_r)
h6b_b_s<-lm(knowledgeW23 ~ test + instiTrustGeorgia)
bptest(h6b_b_s)
qqPlot(h6b_b_s)
h6b_b_t<-lm(knowledgeW23 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_t)
qqPlot(h6b_b_t)
h6b_b_u<-lm(knowledgeW13 ~ test)
bptest(h6b_b_u)
qqPlot(h6b_b_u)
h6b_b_v<-lm(knowledgeW13 ~ instiTrustGeorgia)
bptest(h6b_b_v)
qqPlot(h6b_b_v)
h6b_b_w<-lm(knowledgeW13 ~ test + instiTrustGeorgia)
bptest(h6b_b_w)
qqPlot(h6b_b_w)
h6b_b_x<-lm(knowledgeW13 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_b_x)
qqPlot(h6b_b_x)

# h6b_ Attitudes

h6b_c_a<-lm(attitude1 ~ test)
bptest(h6b_c_a)
qqPlot(h6b_c_a)
h6b_c_b<-lm(attitude1 ~ instiTrustGeorgia)
bptest(h6b_c_b)
qqPlot(h6b_c_b)
cov_h6b_c_b<-vcovHC(h6b_c_b, type="HC3")
rob_h6b_c_b<-sqrt(diag(cov_h6b_c_b))
h6b_c_c<-lm(attitude1 ~ test + instiTrustGeorgia)
bptest(h6b_c_c)
qqPlot(h6b_c_c)
cov_h6b_c_c<-vcovHC(h6b_c_c, type="HC3")
rob_h6b_c_c<-sqrt(diag(cov_h6b_c_c))
h6b_c_d<-lm(attitude1 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_d)
qqPlot(h6b_c_d)
cov_h6b_c_d<-vcovHC(h6b_c_d, type="HC3")
rob_h6b_c_d<-sqrt(diag(cov_h6b_c_d))
h6b_c_e<-lm(attitude2 ~ test)
bptest(h6b_c_e)
qqPlot(h6b_c_e)
h6b_c_f<-lm(attitude2 ~ instiTrustGeorgia)
bptest(h6b_c_f)
qqPlot(h6b_c_f)
cov_h6b_c_f<-vcovHC(h6b_c_f, type="HC3")
rob_h6b_c_f<-sqrt(diag(cov_h6b_c_f))
h6b_c_g<-lm(attitude2 ~ test + instiTrustGeorgia)
bptest(h6b_c_g)
qqPlot(h6b_c_g)
cov_h6b_c_g<-vcovHC(h6b_c_g, type="HC3")
rob_h6b_c_g<-sqrt(diag(cov_h6b_c_g))
h6b_c_h<-lm(attitude2 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_h)
qqPlot(h6b_c_h)
cov_h6b_c_h<-vcovHC(h6b_c_h, type="HC3")
rob_h6b_c_h<-sqrt(diag(cov_h6b_c_h))
h6b_c_i<-lm(attitude3 ~ test)
bptest(h6b_c_i)
qqPlot(h6b_c_i)
h6b_c_j<-lm(attitude3 ~ instiTrustGeorgia)
bptest(h6b_c_j)
qqPlot(h6b_c_j)
cov_h6b_c_i<-vcovHC(h6b_c_i, type="HC3")
rob_h6b_c_i<-sqrt(diag(cov_h6b_c_i))
h6b_c_k<-lm(attitude3 ~ test + instiTrustGeorgia)
bptest(h6b_c_k)
qqPlot(h6b_c_k)
cov_h6b_c_k<-vcovHC(h6b_c_k, type="HC3")
rob_h6b_c_k<-sqrt(diag(cov_h6b_c_k))
h6b_c_l<-lm(attitude3 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_l)
qqPlot(h6b_c_l)
cov_h6b_c_l<-vcovHC(h6b_c_l, type="HC3")
rob_h6b_c_l<-sqrt(diag(cov_h6b_c_l))
h6b_c_m<-lm(attitudeW12 ~ test)
bptest(h6b_c_m)
qqPlot(h6b_c_m)
h6b_c_n<-lm(attitudeW12 ~ instiTrustGeorgia)
bptest(h6b_c_n)
qqPlot(h6b_c_n)
h6b_c_o<-lm(attitudeW12 ~ test + instiTrustGeorgia)
bptest(h6b_c_o)
qqPlot(h6b_c_o)
h6b_c_p<-lm(attitudeW12 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_p)
qqPlot(h6b_c_p)
h6b_c_q<-lm(attitudeW23 ~ test)
bptest(h6b_c_q)
qqPlot(h6b_c_q)
h6b_c_r<-lm(attitudeW23 ~ instiTrustGeorgia)
bptest(h6b_c_r)
qqPlot(h6b_c_r)
h6b_c_s<-lm(attitudeW23 ~ test + instiTrustGeorgia)
bptest(h6b_c_s)
qqPlot(h6b_c_s)
h6b_c_t<-lm(attitudeW23 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_t)
qqPlot(h6b_c_t)
h6b_c_u<-lm(attitudeW13 ~ test)
bptest(h6b_c_u)
qqPlot(h6b_c_u)
h6b_c_v<-lm(attitudeW13 ~ instiTrustGeorgia)
bptest(h6b_c_v)
qqPlot(h6b_c_v)
h6b_c_w<-lm(attitudeW13 ~ test + instiTrustGeorgia)
bptest(h6b_c_w)
qqPlot(h6b_c_w)
h6b_c_x<-lm(attitudeW13 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_c_x)
qqPlot(h6b_c_x)

# h6b_ Perception

h6b_d_a<-lm(perception1 ~ test)
bptest(h6b_d_a)
qqPlot(h6b_d_a)
h6b_d_b<-lm(perception1 ~ instiTrustGeorgia)
bptest(h6b_d_b)
qqPlot(h6b_d_b)
h6b_d_c<-lm(perception1 ~ test + instiTrustGeorgia)
bptest(h6b_d_c)
qqPlot(h6b_d_c)
h6b_d_d<-lm(perception1 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_d)
qqPlot(h6b_d_d)
h6b_d_e<-lm(perception2 ~ test)
bptest(h6b_d_e)
qqPlot(h6b_d_e)
h6b_d_f<-lm(perception2 ~ instiTrustGeorgia)
bptest(h6b_d_f)
qqPlot(h6b_d_f)
cov_h6b_d_f<-vcovHC(h6b_d_f, type="HC3")
rob_h6b_d_f<-sqrt(diag(cov_h6b_d_f))
h6b_d_g<-lm(perception2 ~ test + instiTrustGeorgia)
bptest(h6b_d_g)
qqPlot(h6b_d_g)
cov_h6b_d_g<-vcovHC(h6b_d_g, type="HC3")
rob_h6b_d_g<-sqrt(diag(cov_h6b_d_g))
h6b_d_h<-lm(perception2 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_h)
qqPlot(h6b_d_h)
cov_h6b_d_h<-vcovHC(h6b_d_h, type="HC3")
rob_h6b_d_h<-sqrt(diag(cov_h6b_d_h))
h6b_d_i<-lm(perception3 ~ test)
bptest(h6b_d_i)
qqPlot(h6b_d_i)
h6b_d_j<-lm(perception3 ~ instiTrustGeorgia)
bptest(h6b_d_j)
qqPlot(h6b_d_j)
h6b_d_k<-lm(perception3 ~ test + instiTrustGeorgia)
bptest(h6b_d_k)
qqPlot(h6b_d_k)
h6b_d_l<-lm(perception3 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_l)
qqPlot(h6b_d_l)
h6b_d_m<-lm(perceptionW12 ~ test)
bptest(h6b_d_m)
qqPlot(h6b_d_m)
h6b_d_n<-lm(perceptionW12 ~ instiTrustGeorgia)
bptest(h6b_d_n)
qqPlot(h6b_d_n)
h6b_d_o<-lm(perceptionW12 ~ test + instiTrustGeorgia)
bptest(h6b_d_o)
qqPlot(h6b_d_o)
h6b_d_p<-lm(perceptionW12 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_p)
qqPlot(h6b_d_p)
h6b_d_q<-lm(perceptionW23 ~ test)
bptest(h6b_d_q)
qqPlot(h6b_d_q)
h6b_d_r<-lm(perceptionW23 ~ instiTrustGeorgia)
bptest(h6b_d_r)
qqPlot(h6b_d_r)
h6b_d_s<-lm(perceptionW23 ~ test + instiTrustGeorgia)
bptest(h6b_d_s)
qqPlot(h6b_d_s)
h6b_d_t<-lm(perceptionW23 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_t)
qqPlot(h6b_d_t)
h6b_d_u<-lm(perceptionW13 ~ test)
bptest(h6b_d_u)
qqPlot(h6b_d_u)
h6b_d_v<-lm(perceptionW13 ~ instiTrustGeorgia)
bptest(h6b_d_v)
qqPlot(h6b_d_v)
h6b_d_w<-lm(perceptionW13 ~ test + instiTrustGeorgia)
bptest(h6b_d_w)
qqPlot(h6b_d_w)
h6b_d_x<-lm(perceptionW13 ~ test + instiTrustGeorgia + test:instiTrustGeorgia)
bptest(h6b_d_x)
qqPlot(h6b_d_x)


#############################################################################################################################################################################################

# h7 Behaviors
h7a_a<-lm(fBehave1 ~ test)
bptest(h7a_a)
qqPlot(h7a_a)
h7a_b<-lm(fBehave1 ~ RWnews)
bptest(h7a_b)
qqPlot(h7a_b)
h7a_c<-lm(fBehave1 ~ test + RWnews)
bptest(h7a_c)
qqPlot(h7a_c)
h7a_d<-lm(fBehave1 ~ test + RWnews + test:RWnews)
bptest(h7a_d)
qqPlot(h7a_d)
h7a_e<-lm(fBehave2 ~ test)
bptest(h7a_e)
qqPlot(h7a_e)
h7a_f<-lm(fBehave2 ~ RWnews)
bptest(h7a_f)
qqPlot(h7a_f)
h7a_g<-lm(fBehave2 ~ test + RWnews)
bptest(h7a_g)
qqPlot(h7a_g)
h7a_h<-lm(fBehave2 ~ test + RWnews + test:RWnews)
bptest(h7a_h)
qqPlot(h7a_h)
h7a_i<-lm(fBehave3 ~ test)
bptest(h7a_i)
qqPlot(h7a_i)
cov_h7a_i<-vcovHC(h7a_i, type="HC3")
rob_h7a_i<-sqrt(diag(cov_h7a_i))
h7a_j<-lm(fBehave3 ~ RWnews)
bptest(h7a_j)
qqPlot(h7a_j)
h7a_k<-lm(fBehave3 ~ test + RWnews)
bptest(h7a_k)
qqPlot(h7a_k)
h7a_l<-lm(fBehave3 ~ test + RWnews + test:RWnews)
bptest(h7a_l)
qqPlot(h7a_l)
h7a_m<-lm(fBehaveW12 ~ test)
bptest(h7a_m)
qqPlot(h7a_m)
cov_h7a_m<-vcovHC(h7a_m, type="HC3")
rob_h7a_m<-sqrt(diag(cov_h7a_m))
h7a_n<-lm(fBehaveW12 ~ RWnews)
bptest(h7a_n)
qqPlot(h7a_n)
h7a_o<-lm(fBehaveW12 ~ test + RWnews)
bptest(h7a_o)
qqPlot(h7a_o)
h7a_p<-lm(fBehaveW12 ~ test + RWnews + test:RWnews)
bptest(h7a_p)
qqPlot(h7a_p)
cov_h7a_p<-vcovHC(h7a_p, type="HC3")
rob_h7a_p<-sqrt(diag(cov_h7a_p))
h7a_q<-lm(fBehaveW23 ~ test)
bptest(h7a_q)
qqPlot(h7a_q)
h7a_q<-lm(fBehaveW23 ~ test, data=final_data[-850,])
bptest(h7a_q)
qqPlot(h7a_q)
h7a_r<-lm(fBehaveW23 ~ RWnews)
bptest(h7a_r)
qqPlot(h7a_r)
h7a_r<-lm(fBehaveW23 ~ RWnews, data=final_data[-850,])
bptest(h7a_r)
qqPlot(h7a_r)
h7a_s<-lm(fBehaveW23 ~ test + RWnews)
bptest(h7a_s)
qqPlot(h7a_s)
h7a_s<-lm(fBehaveW23 ~ test + RWnews, data=final_data[-850,])
bptest(h7a_s)
qqPlot(h7a_s)
h7a_t<-lm(fBehaveW23 ~ test + RWnews + test:RWnews)
bptest(h7a_t)
qqPlot(h7a_t)
h7a_t<-lm(fBehaveW23 ~ test + RWnews + test:RWnews, data=final_data[-850,])
bptest(h7a_t)
qqPlot(h7a_t)
cov_h7a_t<-vcovHC(h7a_t, type="HC3")
rob_h7a_t<-sqrt(diag(cov_h7a_t))
h7a_u<-lm(fBehaveW13 ~ test)
bptest(h7a_u)
qqPlot(h7a_u)
h7a_v<-lm(fBehaveW13 ~ RWnews)
bptest(h7a_v)
qqPlot(h7a_v)
h7a_w<-lm(fBehaveW13 ~ test + RWnews)
bptest(h7a_w)
qqPlot(h7a_w)
h7a_x<-lm(fBehaveW13 ~ test + RWnews + test:RWnews)
bptest(h7a_x)
qqPlot(h7a_x)

# h7 Knowledge

h7b_a<-lm(knowledge1 ~ test)
bptest(h7b_a)
qqPlot(h7b_a)
h7b_b<-lm(knowledge1 ~ RWnews)
bptest(h7b_b)
qqPlot(h7b_b)
cov_h7b_b<-vcovHC(h7b_b, type="HC3")
rob_h7b_b<-sqrt(diag(cov_h7b_b))
h7b_c<-lm(knowledge1 ~ test + RWnews)
bptest(h7b_c)
qqPlot(h7b_c)
cov_h7b_c<-vcovHC(h7b_c, type="HC3")
rob_h7b_c<-sqrt(diag(cov_h7b_c))
h7b_d<-lm(knowledge1 ~ test + RWnews + test:RWnews)
bptest(h7b_d)
qqPlot(h7b_d)
cov_h7b_d<-vcovHC(h7b_d, type="HC3")
rob_h7b_d<-sqrt(diag(cov_h7b_d))
h7b_e<-lm(knowledge2 ~ test)
bptest(h7b_e)
qqPlot(h7b_e)
h7b_f<-lm(knowledge2 ~ RWnews)
bptest(h7b_f)
qqPlot(h7b_f)
h7b_g<-lm(knowledge2 ~ test + RWnews)
bptest(h7b_g)
qqPlot(h7b_g)
h7b_h<-lm(knowledge2 ~ test + RWnews + test:RWnews)
bptest(h7b_h)
qqPlot(h7b_h)
h7b_i<-lm(knowledge3 ~ test)
bptest(h7b_i)
qqPlot(h7b_i)
h7b_j<-lm(knowledge3 ~ RWnews)
bptest(h7b_j)
qqPlot(h7b_j)
h7b_k<-lm(knowledge3 ~ test + RWnews)
bptest(h7b_k)
qqPlot(h7b_k)
h7b_l<-lm(knowledge3 ~ test + RWnews + test:RWnews)
bptest(h7b_l)
qqPlot(h7b_l)
h7b_m<-lm(knowledgeW12 ~ test)
bptest(h7b_m)
qqPlot(h7b_m)
h7b_n<-lm(knowledgeW12 ~ RWnews)
bptest(h7b_n)
qqPlot(h7b_n)
h7b_o<-lm(knowledgeW12 ~ test + RWnews)
bptest(h7b_o)
qqPlot(h7b_o)
h7b_p<-lm(knowledgeW12 ~ test + RWnews + test:RWnews)
bptest(h7b_p)
qqPlot(h7b_p)
cov_h7b_p<-vcovHC(h7b_p, type="HC3")
rob_h7b_p<-sqrt(diag(cov_h7b_p))
h7b_q<-lm(knowledgeW23 ~ test)
bptest(h7b_q)
qqPlot(h7b_q)
h7b_r<-lm(knowledgeW23 ~ RWnews)
bptest(h7b_r)
qqPlot(h7b_r)
h7b_s<-lm(knowledgeW23 ~ test + RWnews)
bptest(h7b_s)
qqPlot(h7b_s)
h7b_t<-lm(knowledgeW23 ~ test + RWnews + test:RWnews)
bptest(h7b_t)
qqPlot(h7b_t)
h7b_u<-lm(knowledgeW13 ~ test)
bptest(h7b_u)
qqPlot(h7b_u)
h7b_v<-lm(knowledgeW13 ~ RWnews)
bptest(h7b_v)
qqPlot(h7b_v)
h7b_w<-lm(knowledgeW13 ~ test + RWnews)
bptest(h7b_w)
qqPlot(h7b_w)
h7b_x<-lm(knowledgeW13 ~ test + RWnews + test:RWnews)
bptest(h7b_x)
qqPlot(h7b_x)

# h7 Attitudes

h7c_a<-lm(attitude1 ~ test)
bptest(h7c_a)
qqPlot(h7c_a)
h7c_b<-lm(attitude1 ~ RWnews)
bptest(h7c_b)
qqPlot(h7c_b)
cov_h7c_b<-vcovHC(h7c_b, type="HC3")
rob_h7c_b<-sqrt(diag(cov_h7c_b))
h7c_c<-lm(attitude1 ~ test + RWnews)
bptest(h7c_c)
qqPlot(h7c_c)
cov_h7c_c<-vcovHC(h7c_c, type="HC3")
rob_h7c_c<-sqrt(diag(cov_h7c_c))
h7c_d<-lm(attitude1 ~ test + RWnews + test:RWnews)
bptest(h7c_d)
qqPlot(h7c_d)
cov_h7c_d<-vcovHC(h7c_d, type="HC3")
rob_h7c_d<-sqrt(diag(cov_h7c_d))
h7c_e<-lm(attitude2 ~ test)
bptest(h7c_e)
qqPlot(h7c_e)
h7c_f<-lm(attitude2 ~ RWnews)
bptest(h7c_f)
qqPlot(h7c_f)
cov_h7c_f<-vcovHC(h7c_f, type="HC3")
rob_h7c_f<-sqrt(diag(cov_h7c_f))
h7c_g<-lm(attitude2 ~ test + RWnews)
bptest(h7c_g)
qqPlot(h7c_g)
h7c_h<-lm(attitude2 ~ test + RWnews + test:RWnews)
bptest(h7c_h)
qqPlot(h7c_h)
h7c_i<-lm(attitude3 ~ test)
bptest(h7c_i)
qqPlot(h7c_i)
h7c_j<-lm(attitude3 ~ RWnews)
bptest(h7c_j)
qqPlot(h7c_j)
h7c_k<-lm(attitude3 ~ test + RWnews)
bptest(h7c_k)
qqPlot(h7c_k)
h7c_l<-lm(attitude3 ~ test + RWnews + test:RWnews)
bptest(h7c_l)
qqPlot(h7c_l)
h7c_m<-lm(attitudeW12 ~ test)
bptest(h7c_m)
qqPlot(h7c_m)
h7c_n<-lm(attitudeW12 ~ RWnews)
bptest(h7c_n)
qqPlot(h7c_n)
h7c_o<-lm(attitudeW12 ~ test + RWnews)
bptest(h7c_o)
qqPlot(h7c_o)
h7c_p<-lm(attitudeW12 ~ test + RWnews + test:RWnews)
bptest(h7c_p)
qqPlot(h7c_p)
h7c_q<-lm(attitudeW23 ~ test)
bptest(h7c_q)
qqPlot(h7c_q)
h7c_r<-lm(attitudeW23 ~ RWnews)
bptest(h7c_r)
qqPlot(h7c_r)
h7c_s<-lm(attitudeW23 ~ test + RWnews)
bptest(h7c_s)
qqPlot(h7c_s)
h7c_t<-lm(attitudeW23 ~ test + RWnews + test:RWnews)
bptest(h7c_t)
qqPlot(h7c_t)
h7c_u<-lm(attitudeW13 ~ test)
bptest(h7c_u)
qqPlot(h7c_u)
h7c_v<-lm(attitudeW13 ~ RWnews)
bptest(h7c_v)
qqPlot(h7c_v)
h7c_w<-lm(attitudeW13 ~ test + RWnews)
bptest(h7c_w)
qqPlot(h7c_w)
h7c_x<-lm(attitudeW13 ~ test + RWnews + test:RWnews)
bptest(h7c_x)
qqPlot(h7c_x)

# h7 Perception

h7d_a<-lm(perception1 ~ test)
bptest(h7d_a)
qqPlot(h7d_a)
h7d_b<-lm(perception1 ~ RWnews)
bptest(h7d_b)
qqPlot(h7d_b)
cov_h7d_b<-vcovHC(h7d_b, type="HC3")
rob_h7d_b<-sqrt(diag(cov_h7d_b))
h7d_c<-lm(perception1 ~ test + RWnews)
bptest(h7d_c)
qqPlot(h7d_c)
cov_h7d_c<-vcovHC(h7d_c, type="HC3")
rob_h7d_c<-sqrt(diag(cov_h7d_c))
h7d_d<-lm(perception1 ~ test + RWnews + test:RWnews)
bptest(h7d_d)
qqPlot(h7d_d)
cov_h7d_d<-vcovHC(h7d_d, type="HC3")
rob_h7d_d<-sqrt(diag(cov_h7d_d))
h7d_e<-lm(perception2 ~ test)
bptest(h7d_e)
qqPlot(h7d_e)
h7d_f<-lm(perception2 ~ RWnews)
bptest(h7d_f)
qqPlot(h7d_f)
h7d_g<-lm(perception2 ~ test + RWnews)
bptest(h7d_g)
qqPlot(h7d_g)
h7d_h<-lm(perception2 ~ test + RWnews + test:RWnews)
bptest(h7d_h)
qqPlot(h7d_h)
h7d_i<-lm(perception3 ~ test)
bptest(h7d_i)
qqPlot(h7d_i)
h7d_j<-lm(perception3 ~ RWnews)
bptest(h7d_j)
qqPlot(h7d_j)
h7d_k<-lm(perception3 ~ test + RWnews)
bptest(h7d_k)
qqPlot(h7d_k)
h7d_l<-lm(perception3 ~ test + RWnews + test:RWnews)
bptest(h7d_l)
qqPlot(h7d_l)
h7d_m<-lm(perceptionW12 ~ test)
bptest(h7d_m)
qqPlot(h7d_m)
h7d_n<-lm(perceptionW12 ~ RWnews)
bptest(h7d_n)
qqPlot(h7d_n)
h7d_o<-lm(perceptionW12 ~ test + RWnews)
bptest(h7d_o)
qqPlot(h7d_o)
h7d_p<-lm(perceptionW12 ~ test + RWnews + test:RWnews)
bptest(h7d_p)
qqPlot(h7d_p)
h7d_q<-lm(perceptionW23 ~ test)
bptest(h7d_q)
qqPlot(h7d_q)
h7d_r<-lm(perceptionW23 ~ RWnews)
bptest(h7d_r)
qqPlot(h7d_r)
h7d_s<-lm(perceptionW23 ~ test + RWnews)
bptest(h7d_s)
qqPlot(h7d_s)
h7d_t<-lm(perceptionW23 ~ test + RWnews + test:RWnews)
bptest(h7d_t)
qqPlot(h7d_t)
h7d_u<-lm(perceptionW13 ~ test)
bptest(h7d_u)
qqPlot(h7d_u)
h7d_v<-lm(perceptionW13 ~ RWnews)
bptest(h7d_v)
qqPlot(h7d_v)
h7d_w<-lm(perceptionW13 ~ test + RWnews)
bptest(h7d_w)
qqPlot(h7d_w)
h7d_x<-lm(perceptionW13 ~ test + RWnews + test:RWnews)
bptest(h7d_x)
qqPlot(h7d_x)


#############################################################################################################################################################################################

# h8 Behaviors
h8a_a<-lm(fBehave1 ~ test)
bptest(h8a_a)
qqPlot(h8a_a)
h8a_b<-lm(fBehave1 ~ normW1)
bptest(h8a_b)
qqPlot(h8a_b)
cov_h8a_b<-vcovHC(h8a_b, type="HC3")
rob_h8a_b<-sqrt(diag(cov_h8a_b))
h8a_c<-lm(fBehave1 ~ test + normW1)
bptest(h8a_c)
qqPlot(h8a_c)
cov_h8a_c<-vcovHC(h8a_c, type="HC3")
rob_h8a_c<-sqrt(diag(cov_h8a_c))
h8a_d<-lm(fBehave1 ~ test + normW1 + test:normW1)
bptest(h8a_d)
qqPlot(h8a_d)
cov_h8a_d<-vcovHC(h8a_d, type="HC3")
rob_h8a_d<-sqrt(diag(cov_h8a_d))
h8a_e<-lm(fBehave2 ~ test)
bptest(h8a_e)
qqPlot(h8a_e)
h8a_f<-lm(fBehave2 ~ normW2)
bptest(h8a_f)
qqPlot(h8a_f)
cov_h8a_f<-vcovHC(h8a_f, type="HC3")
rob_h8a_f<-sqrt(diag(cov_h8a_f))
h8a_g<-lm(fBehave2 ~ test + normW2)
bptest(h8a_g)
qqPlot(h8a_g)
cov_h8a_g<-vcovHC(h8a_g, type="HC3")
rob_h8a_g<-sqrt(diag(cov_h8a_g))
h8a_h<-lm(fBehave2 ~ test + normW2 + test:normW2)
bptest(h8a_h)
qqPlot(h8a_h)
cov_h8a_h<-vcovHC(h8a_h, type="HC3")
rob_h8a_h<-sqrt(diag(cov_h8a_h))
h8a_i<-lm(fBehave3 ~ test)
bptest(h8a_i)
qqPlot(h8a_i)
cov_h8a_i<-vcovHC(h8a_i, type="HC3")
rob_h8a_i<-sqrt(diag(cov_h8a_i))
h8a_j<-lm(fBehave3 ~ normW3)
bptest(h8a_j)
qqPlot(h8a_j)
h8a_k<-lm(fBehave3 ~ test + normW3)
bptest(h8a_k)
qqPlot(h8a_k)
h8a_l<-lm(fBehave3 ~ test + normW3 + test:normW3)
bptest(h8a_l)
qqPlot(h8a_l)
h8a_m<-lm(fBehaveW12 ~ test)
bptest(h8a_m)
qqPlot(h8a_m)
cov_h8a_i<-vcovHC(h8a_i, type="HC3")
rob_h8a_i<-sqrt(diag(cov_h8a_i))
h8a_n<-lm(fBehaveW12 ~ normW1W2)
bptest(h8a_n)
qqPlot(h8a_n)
h8a_o<-lm(fBehaveW12 ~ test + normW1W2)
bptest(h8a_o)
qqPlot(h8a_o)
h8a_p<-lm(fBehaveW12 ~ test + normW1W2 + test:normW1W2)
bptest(h8a_p)
qqPlot(h8a_p)
h8a_q<-lm(fBehaveW23 ~ test)
bptest(h8a_q)
qqPlot(h8a_q)
h8a_q<-lm(fBehaveW23 ~ test, data=final_data[-850,])
bptest(h8a_q)
qqPlot(h8a_q)
h8a_r<-lm(fBehaveW23 ~ normW2W3)
bptest(h8a_r)
qqPlot(h8a_r)
h8a_r<-lm(fBehaveW23 ~ normW2W3, data=final_data[-850,])
bptest(h8a_r)
qqPlot(h8a_r)
h8a_s<-lm(fBehaveW23 ~ test + normW2W3)
bptest(h8a_s)
qqPlot(h8a_s)
h8a_s<-lm(fBehaveW23 ~ test + normW2W3, data=final_data[-850,])
bptest(h8a_s)
qqPlot(h8a_s)
h8a_t<-lm(fBehaveW23 ~ test + normW2W3 + test:normW2W3)
bptest(h8a_t)
qqPlot(h8a_t)
h8a_t<-lm(fBehaveW23 ~ test + normW2W3 + test:normW2W3, data=final_data[-850,])
bptest(h8a_t)
qqPlot(h8a_t)
h8a_u<-lm(fBehaveW13 ~ test)
bptest(h8a_u)
qqPlot(h8a_u)
h8a_v<-lm(fBehaveW13 ~ normW1W3)
bptest(h8a_v)
qqPlot(h8a_v)
h8a_w<-lm(fBehaveW13 ~ test + normW1W3)
bptest(h8a_w)
qqPlot(h8a_w)
h8a_x<-lm(fBehaveW13 ~ test + normW1W3 + test:normW1W3)
bptest(h8a_x)
qqPlot(h8a_x)

# h8 Knowledge

h8b_a<-lm(knowledge1 ~ test)
bptest(h8b_a)
qqPlot(h8b_a)
h8b_b<-lm(knowledge1 ~ normW1)
bptest(h8b_b)
qqPlot(h8b_b)
cov_h8b_b<-vcovHC(h8b_b, type="HC3")
rob_h8b_b<-sqrt(diag(cov_h8b_b))
h8b_c<-lm(knowledge1 ~ test + normW1)
bptest(h8b_c)
qqPlot(h8b_c)
cov_h8b_c<-vcovHC(h8b_c, type="HC3")
rob_h8b_c<-sqrt(diag(cov_h8b_c))
h8b_d<-lm(knowledge1 ~ test + normW1 + test:normW1)
bptest(h8b_d)
qqPlot(h8b_d)
cov_h8b_d<-vcovHC(h8b_d, type="HC3")
rob_h8b_d<-sqrt(diag(cov_h8b_d))
h8b_e<-lm(knowledge2 ~ test)
bptest(h8b_e)
qqPlot(h8b_e)
h8b_f<-lm(knowledge2 ~ normW2)
bptest(h8b_f)
qqPlot(h8b_f)
h8b_g<-lm(knowledge2 ~ test + normW2)
bptest(h8b_g)
qqPlot(h8b_g)
cov_h8b_g<-vcovHC(h8b_g, type="HC3")
rob_h8b_g<-sqrt(diag(cov_h8b_g))
h8b_h<-lm(knowledge2 ~ test + normW2 + test:normW2)
bptest(h8b_h)
qqPlot(h8b_h)
h8b_i<-lm(knowledge3 ~ test)
bptest(h8b_i)
qqPlot(h8b_i)
h8b_j<-lm(knowledge3 ~ normW3)
bptest(h8b_j)
qqPlot(h8b_j)
h8b_k<-lm(knowledge3 ~ test + normW3)
bptest(h8b_k)
qqPlot(h8b_k)
h8b_l<-lm(knowledge3 ~ test + normW3 + test:normW3)
bptest(h8b_l)
qqPlot(h8b_l)
h8b_m<-lm(knowledgeW12 ~ test)
bptest(h8b_m)
qqPlot(h8b_m)
h8b_n<-lm(knowledgeW12 ~ normW1W2)
bptest(h8b_n)
qqPlot(h8b_n)
h8b_o<-lm(knowledgeW12 ~ test + normW1W2)
bptest(h8b_o)
qqPlot(h8b_o)
h8b_p<-lm(knowledgeW12 ~ test + normW1W2 + test:normW1W2)
bptest(h8b_p)
qqPlot(h8b_p)
h8b_q<-lm(knowledgeW23 ~ test)
bptest(h8b_q)
qqPlot(h8b_q)
h8b_r<-lm(knowledgeW23 ~ normW2W3)
bptest(h8b_r)
qqPlot(h8b_r)
h8b_s<-lm(knowledgeW23 ~ test + normW2W3)
bptest(h8b_s)
qqPlot(h8b_s)
h8b_t<-lm(knowledgeW23 ~ test + normW2W3 + test:normW2W3)
bptest(h8b_t)
qqPlot(h8b_t)
h8b_u<-lm(knowledgeW13 ~ test)
bptest(h8b_u)
qqPlot(h8b_u)
h8b_v<-lm(knowledgeW13 ~ normW1W3)
bptest(h8b_v)
qqPlot(h8b_v)
h8b_w<-lm(knowledgeW13 ~ test + normW1W3)
bptest(h8b_w)
qqPlot(h8b_w)
h8b_x<-lm(knowledgeW13 ~ test + normW1W3 + test:normW1W3)
bptest(h8b_x)
qqPlot(h8b_x)

# h8 Attitudes

h8c_a<-lm(attitude1 ~ test)
bptest(h8c_a)
qqPlot(h8c_a)
h8c_b<-lm(attitude1 ~ normW1)
bptest(h8c_b)
qqPlot(h8c_b)
cov_h8c_b<-vcovHC(h8c_b, type="HC3")
rob_h8c_b<-sqrt(diag(cov_h8c_b))
h8c_c<-lm(attitude1 ~ test + normW1)
bptest(h8c_c)
qqPlot(h8c_c)
cov_h8c_c<-vcovHC(h8c_c, type="HC3")
rob_h8c_c<-sqrt(diag(cov_h8c_c))
h8c_d<-lm(attitude1 ~ test + normW1 + test:normW1)
bptest(h8c_d)
qqPlot(h8c_d)
cov_h8c_d<-vcovHC(h8c_d, type="HC3")
rob_h8c_d<-sqrt(diag(cov_h8c_d))
h8c_e<-lm(attitude2 ~ test)
bptest(h8c_e)
qqPlot(h8c_e)
h8c_f<-lm(attitude2 ~ normW2)
bptest(h8c_f)
qqPlot(h8c_f)
cov_h8c_f<-vcovHC(h8c_f, type="HC3")
rob_h8c_f<-sqrt(diag(cov_h8c_f))
h8c_g<-lm(attitude2 ~ test + normW2)
bptest(h8c_g)
qqPlot(h8c_g)
cov_h8c_g<-vcovHC(h8c_g, type="HC3")
rob_h8c_g<-sqrt(diag(cov_h8c_g))
h8c_h<-lm(attitude2 ~ test + normW2 + test:normW2)
bptest(h8c_h)
qqPlot(h8c_h)
h8c_i<-lm(attitude3 ~ test)
bptest(h8c_i)
qqPlot(h8c_i)
h8c_j<-lm(attitude3 ~ normW3)
bptest(h8c_j)
qqPlot(h8c_j)
h8c_k<-lm(attitude3 ~ test + normW3)
bptest(h8c_k)
qqPlot(h8c_k)
h8c_l<-lm(attitude3 ~ test + normW3 + test:normW3)
bptest(h8c_l)
qqPlot(h8c_l)
h8c_m<-lm(attitudeW12 ~ test)
bptest(h8c_m)
qqPlot(h8c_m)
h8c_n<-lm(attitudeW12 ~ normW1W2)
bptest(h8c_n)
qqPlot(h8c_n)
h8c_o<-lm(attitudeW12 ~ test + normW1W2)
bptest(h8c_o)
qqPlot(h8c_o)
h8c_p<-lm(attitudeW12 ~ test + normW1W2 + test:normW1W2)
bptest(h8c_p)
qqPlot(h8c_p)
h8c_q<-lm(attitudeW23 ~ test)
bptest(h8c_q)
qqPlot(h8c_q)
h8c_r<-lm(attitudeW23 ~ normW2W3)
bptest(h8c_r)
qqPlot(h8c_r)
h8c_s<-lm(attitudeW23 ~ test + normW2W3)
bptest(h8c_s)
qqPlot(h8c_s)
h8c_t<-lm(attitudeW23 ~ test + normW2W3 + test:normW2W3)
bptest(h8c_t)
qqPlot(h8c_t)
h8c_u<-lm(attitudeW13 ~ test)
bptest(h8c_u)
qqPlot(h8c_u)
h8c_v<-lm(attitudeW13 ~ normW1W3)
bptest(h8c_v)
qqPlot(h8c_v)
h8c_w<-lm(attitudeW13 ~ test + normW1W3)
bptest(h8c_w)
qqPlot(h8c_w)
h8c_x<-lm(attitudeW13 ~ test + normW1W3 + test:normW1W3)
bptest(h8c_x)
qqPlot(h8c_x)

# h8 Perception
h8d_a<-lm(perception1 ~ test)
bptest(h8d_a)
qqPlot(h8d_a)
h8d_b<-lm(perception1 ~ normW1)
bptest(h8d_b)
qqPlot(h8d_b)
cov_h8d_b<-vcovHC(h8d_b, type="HC3")
rob_h8d_b<-sqrt(diag(cov_h8d_b))
h8d_c<-lm(perception1 ~ test + normW1)
bptest(h8d_c)
qqPlot(h8d_c)
cov_h8d_c<-vcovHC(h8d_c, type="HC3")
rob_h8d_c<-sqrt(diag(cov_h8d_c))
h8d_d<-lm(perception1 ~ test + normW1 + test:normW1)
bptest(h8d_d)
qqPlot(h8d_d)
h8d_e<-lm(perception2 ~ test)
bptest(h8d_e)
qqPlot(h8d_e)
h8d_f<-lm(perception2 ~ normW2)
bptest(h8d_f)
qqPlot(h8d_f)
h8d_g<-lm(perception2 ~ test + normW2)
bptest(h8d_g)
qqPlot(h8d_g)
h8d_h<-lm(perception2 ~ test + normW2 + test:normW2)
bptest(h8d_h)
qqPlot(h8d_h)
h8d_i<-lm(perception3 ~ test)
bptest(h8d_i)
qqPlot(h8d_i)
h8d_j<-lm(perception3 ~ normW3)
bptest(h8d_j)
qqPlot(h8d_j)
h8d_k<-lm(perception3 ~ test + normW3)
bptest(h8d_k)
qqPlot(h8d_k)
h8d_l<-lm(perception3 ~ test + normW3 + test:normW3)
bptest(h8d_l)
qqPlot(h8d_l)
h8d_m<-lm(perceptionW12 ~ test)
bptest(h8d_m)
qqPlot(h8d_m)
h8d_n<-lm(perceptionW12 ~ normW1W2)
bptest(h8d_n)
qqPlot(h8d_n)
h8d_o<-lm(perceptionW12 ~ test + normW1W2)
bptest(h8d_o)
qqPlot(h8d_o)
h8d_p<-lm(perceptionW12 ~ test + normW1W2 + test:normW1W2)
bptest(h8d_p)
qqPlot(h8d_p)
h8d_q<-lm(perceptionW23 ~ test)
bptest(h8d_q)
qqPlot(h8d_q)
h8d_r<-lm(perceptionW23 ~ normW2W3)
bptest(h8d_r)
qqPlot(h8d_r)
h8d_s<-lm(perceptionW23 ~ test + normW2W3)
bptest(h8d_s)
qqPlot(h8d_s)
h8d_t<-lm(perceptionW23 ~ test + normW2W3 + test:normW2W3)
bptest(h8d_t)
qqPlot(h8d_t)
h8d_u<-lm(perceptionW13 ~ test)
bptest(h8d_u)
qqPlot(h8d_u)
h8d_v<-lm(perceptionW13 ~ normW1W3)
bptest(h8d_v)
qqPlot(h8d_v)
h8d_w<-lm(perceptionW13 ~ test + normW1W3)
bptest(h8d_w)
qqPlot(h8d_w)
h8d_x<-lm(perceptionW13 ~ test + normW1W3 + test:normW1W3)
bptest(h8d_x)
qqPlot(h8d_x)



# Alternate Norm Testing=Nothing

check1<-lm(normW1 ~ test)
check2<-lm(normW2 ~ test)
check3<-lm(normW3 ~ test)
check12<-lm(normW12 ~ test)
check23<-lm(normW23 ~ test)
check13<-lm(normW13 ~ test)


summary(check1)
summary(check2)
summary(check3)
summary(check12)
summary(check23)
summary(check13)

checkR1<-lm(normW1 ~ test + riskaverse + test:riskaverse)
checkR2<-lm(normW2 ~ test + riskaverse + test:riskaverse)
checkR3<-lm(normW3 ~ test + riskaverse + test:riskaverse)
checkR12<-lm(normW12 ~ test + riskaverse + test:riskaverse)
checkR23<-lm(normW23 ~ test + riskaverse + test:riskaverse)
checkR13<-lm(normW13 ~ test + riskaverse + test:riskaverse)


summary(checkR1)
summary(checkR2)
summary(checkR3)
summary(checkR12)
summary(checkR23)
summary(checkR13)

checkC1<-lm(normW1 ~ test + conspir + test:conspir)
checkC2<-lm(normW2 ~ test + conspir + test:conspir)
checkC3<-lm(normW3 ~ test + conspir + test:conspir)
checkC12<-lm(normW12 ~ test + conspir + test:conspir)
checkC23<-lm(normW23 ~ test + conspir + test:conspir)
checkC13<-lm(normW13 ~ test + conspir + test:conspir)


summary(checkC1)
summary(checkC2)
summary(checkC3)
summary(checkC12)
summary(checkC23)
summary(checkC13)

checkS1<-lm(normW1 ~ test + soctrust + test:soctrust)
checkS2<-lm(normW2 ~ test + soctrust + test:soctrust)
checkS3<-lm(normW3 ~ test + soctrust + test:soctrust)
checkS12<-lm(normW12 ~ test + soctrust + test:soctrust)
checkS23<-lm(normW23 ~ test + soctrust + test:soctrust)
checkS13<-lm(normW13 ~ test + soctrust + test:soctrust)


summary(checkS1)
summary(checkS2)
summary(checkS3)
summary(checkS12)
summary(checkS23)
summary(checkS13)


#############################################################################################################################################################################################
#############################################################################################################################################################################################

stargazer(h3a_d, h3a_h, h3a_l, h3a_p, h3a_t, h3a_x, type = "html", 
          covariate.labels = c("Treatment", "Risk Aversion", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h3a_h, NULL, NULL, NULL, rob_h3a_x),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h3a.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h3b_d, h3b_h, h3b_l, h3b_p, h3b_t, h3b_x, type = "html", 
          covariate.labels = c("Treatment", "Risk Aversion", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h3b.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h3c_d, h3c_h, h3c_l, h3c_p, h3c_t, h3c_x, type = "html", 
          covariate.labels = c("Treatment", "Risk Aversion", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h3c_h, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h3c.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h3d_d, h3d_h, h3d_l, h3d_p, h3d_t, h3d_x, type = "html", 
          covariate.labels = c("Treatment", "Risk Aversion", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h3d.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h4a_d, h4a_h, h4a_l, h4a_p, h4a_t, h4a_x, type = "html", 
          covariate.labels = c("Treatment", "Conspiratorial Thinking", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h4a_h, rob_h4a_l, NULL, rob_h4a_t, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h4a.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h4b_d, h4b_h, h4b_l, h4b_p, h4b_t, h4b_x, type = "html", 
          covariate.labels = c("Treatment", "Conspiratorial Thinking", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, rob_h4b_t, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h4b.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h4c_d, h4c_h, h4c_l, h4c_p, h4c_t, h4c_x, type = "html", 
          covariate.labels = c("Treatment", "Conspiratorial Thinking", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(rob_h4c_d, NULL, rob_h4c_l, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h4c.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h4d_d, h4d_h, h4d_l, h4d_p, h4d_t, h4d_x, type = "html", 
          covariate.labels = c("Treatment", "Conspiratorial Thinking", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h4d.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h5a_d, h5a_h, h5a_l, h5a_p, h5a_t, h5a_x, type = "html", 
          covariate.labels = c("Treatment", "Social Trust", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, rob_h5a_l, rob_h5a_p, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h5a.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h5b_d, h5b_h, h5b_l, h5b_p, h5b_t, h5b_x, type = "html", 
          covariate.labels = c("Treatment", "Social Trust", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(rob_h5b_d, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h5b.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h5c_d, h5c_h, h5c_l, h5c_p, h5c_t, h5c_x, type = "html", 
          covariate.labels = c("Treatment", "Social Trust", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h5c.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h5d_d, h5d_h, h5d_l, h5d_p, h5d_t, h5d_x, type = "html", 
          covariate.labels = c("Treatment", "Social Trust", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h5d.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6a_a_d, h6a_a_h, h6a_a_l, h6a_a_p, h6a_a_t, h6a_a_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: National", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(rob_h6a_a_d, rob_h6a_a_h, rob_h6a_a_l, rob_h6a_a_p, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6aa.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6a_b_d, h6a_b_h, h6a_b_l, h6a_b_p, h6a_b_t, h6a_b_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: National", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h6a_b_h, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6ab.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6a_c_d, h6a_c_h, h6a_c_l, h6a_c_p, h6a_c_t, h6a_c_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: National", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(rob_h6a_c_d, rob_h6a_c_h, rob_h6a_c_l, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Analysis/Projects/COVID/h6ac.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6a_d_d, h6a_d_h, h6a_d_l, h6a_d_p, h6a_d_t, h6a_d_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: National", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6ad.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6b_a_d, h6b_a_h, h6b_a_l, h6b_a_p, h6b_a_t, h6b_a_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: Georgia", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(rob_h6b_a_d, rob_h6b_a_h, rob_h6b_a_l, rob_h6b_a_p, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6ba.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6b_b_d, h6b_b_h, h6b_b_l, h6b_b_p, h6b_b_t, h6b_b_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: Georgia", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h6b_b_h, NULL, rob_h6b_b_p, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6bb.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6b_c_d, h6b_c_h, h6b_c_l, h6b_c_p, h6b_c_t, h6b_c_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: Georgia", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(rob_h6b_c_d, rob_h6b_c_h, rob_h6b_c_l, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6bc.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h6b_d_d, h6b_d_h, h6b_d_l, h6b_d_p, h6b_d_t, h6b_d_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: Georgia", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, rob_h6b_d_h, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6bd.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h7a_d, h7a_h, h7a_l, h7a_p, h7a_t, h7a_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, rob_h7a_t, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h7a.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h7b_d, h7b_h, h7b_l, h7b_p, h7b_t, h7b_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(rob_h7b_d, NULL, NULL, rob_h7b_p, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h7b.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h7c_d, h7c_h, h7c_l, h7c_p, h7c_t, h7c_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(rob_h7c_d, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h7c.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h7d_d, h7d_h, h7d_l, h7d_p, h7d_t, h7d_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(rob_h7d_d, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h7d.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h8a_d, h8a_h, h8a_l, h8a_p, h8a_t, h8a_x, type = "html", 
          covariate.labels = c("Treatment", "Norms: Wave 1", "Interaction", "Norms: Wave 2", "Interaction", "Norms: Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 2", "Interaction", "Norm Change: Wave 2 to Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 3", "Interaction"), 
          dep.var.labels = c("Behaviors: Wave 1", "Behaviors: Wave 2", "Behaviors: Wave 3", "Behavior Change: Wave 1 to Wave 2", "Behavior Change: Wave 2 to Wave 3", "Behavior Change: Wave 1 to Wave 3"), 
          se=list(rob_h8a_d, rob_h8a_h, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h8a.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h8b_d, h8b_h, h8b_l, h8b_p, h8b_t, h8b_x, type = "html", 
          covariate.labels = c("Treatment", "Norms: Wave 1", "Interaction", "Norms: Wave 2", "Interaction", "Norms: Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 2", "Interaction", "Norm Change: Wave 2 to Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 3", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(rob_h8b_d, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h8b.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h8c_d, h8c_h, h8c_l, h8c_p, h8c_t, h8c_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Attitudes: Wave 1", "Attitudes: Wave 2", "Attitudes: Wave 3", "Attitudes Change: Wave 1 to Wave 2", "Attitudes Change: Wave 2 to Wave 3", "Attitudes Change: Wave 1 to Wave 3"), 
          se=list(rob_h8b_d, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h8c.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h8d_d, h8d_h, h8d_l, h8d_p, h8d_t, h8d_x, type = "html", 
          covariate.labels = c("Treatment", "Norms: Wave 1", "Interaction", "Norms: Wave 2", "Interaction", "Norms: Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 2", "Interaction", "Norm Change: Wave 2 to Wave 3", "Interaction", "Norm Change: Wave 1 to Wave 3", "Interaction"), 
          dep.var.labels = c("Perceptions: Wave 1", "Perceptions: Wave 2", "Perceptions: Wave 3", "Perceptions Change: Wave 1 to Wave 2", "Perceptions Change: Wave 2 to Wave 3", "Perceptions Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h8d.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

########################################################################################################################################################################

# Alternative Testing with Binary Outcome measure for knowledge

h3_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h3_binary_b<-glm(BinKnowW1 ~ riskaverse, family="binomial")
h3_binary_c<-glm(BinKnowW1 ~ test + riskaverse, family="binomial")
h3_binary_d<-glm(BinKnowW1 ~ test + riskaverse + test:riskaverse, family="binomial")
h3_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h3_binary_f<-glm(BinKnowW2 ~ riskaverse, family="binomial")
h3_binary_g<-glm(BinKnowW2 ~ test + riskaverse, family="binomial")
h3_binary_h<-glm(BinKnowW2 ~ test + riskaverse + test:riskaverse, family="binomial")
h3_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h3_binary_j<-glm(BinKnowW3 ~ riskaverse, family="binomial")
h3_binary_k<-glm(BinKnowW3 ~ test + riskaverse, family="binomial")
h3_binary_l<-glm(BinKnowW3 ~ test + riskaverse + test:riskaverse, family = "binomial")
h3_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h3_binary_n<-polr(as.factor(BinKnowW12) ~ riskaverse, method = "logistic")
h3_binary_o<-polr(as.factor(BinKnowW12) ~ test + riskaverse, method = "logistic")
h3_binary_p<-polr(as.factor(BinKnowW12) ~ test + riskaverse + test:riskaverse, method = "logistic")
h3_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h3_binary_r<-polr(as.factor(BinKnowW23) ~ riskaverse, method = "logistic")
h3_binary_s<-polr(as.factor(BinKnowW23) ~ test + riskaverse, method = "logistic")
h3_binary_t<-polr(as.factor(BinKnowW23) ~ test + riskaverse + test:riskaverse, method = "logistic")
h3_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h3_binary_v<-polr(as.factor(BinKnowW13) ~ riskaverse, method = "logistic")
h3_binary_w<-polr(as.factor(BinKnowW13) ~ test + riskaverse, method = "logistic")
h3_binary_x<-polr(as.factor(BinKnowW13) ~ test + riskaverse + test:riskaverse, method="logistic")

h4_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h4_binary_b<-glm(BinKnowW1 ~ conspir, family="binomial")
h4_binary_c<-glm(BinKnowW1 ~ test + conspir, family="binomial")
h4_binary_d<-glm(BinKnowW1 ~ test + conspir + test:conspir, family="binomial")
h4_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h4_binary_f<-glm(BinKnowW2 ~ conspir, family="binomial")
h4_binary_g<-glm(BinKnowW2 ~ test + conspir, family="binomial")
h4_binary_h<-glm(BinKnowW2 ~ test + conspir + test:conspir, family="binomial")
h4_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h4_binary_j<-glm(BinKnowW3 ~ conspir, family="binomial")
h4_binary_k<-glm(BinKnowW3 ~ test + conspir, family="binomial")
h4_binary_l<-glm(BinKnowW3 ~ test + conspir + test:conspir, family = "binomial")
h4_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h4_binary_n<-polr(as.factor(BinKnowW12) ~ conspir, method = "logistic")
h4_binary_o<-polr(as.factor(BinKnowW12) ~ test + conspir, method = "logistic")
h4_binary_p<-polr(as.factor(BinKnowW12) ~ test + conspir + test:conspir, method = "logistic")
h4_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h4_binary_r<-polr(as.factor(BinKnowW23) ~ conspir, method = "logistic")
h4_binary_s<-polr(as.factor(BinKnowW23) ~ test + conspir, method = "logistic")
h4_binary_t<-polr(as.factor(BinKnowW23) ~ test + conspir + test:conspir, method = "logistic")
h4_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h4_binary_v<-polr(as.factor(BinKnowW13) ~ conspir, method = "logistic")
h4_binary_w<-polr(as.factor(BinKnowW13) ~ test + conspir, method = "logistic")
h4_binary_x<-polr(as.factor(BinKnowW13) ~ test + conspir + test:conspir, method="logistic")

h5_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h5_binary_b<-glm(BinKnowW1 ~ soctrust, family="binomial")
h5_binary_c<-glm(BinKnowW1 ~ test + soctrust, family="binomial")
h5_binary_d<-glm(BinKnowW1 ~ test + soctrust + test:soctrust, family="binomial")
h5_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h5_binary_f<-glm(BinKnowW2 ~ soctrust, family="binomial")
h5_binary_g<-glm(BinKnowW2 ~ test + soctrust, family="binomial")
h5_binary_h<-glm(BinKnowW2 ~ test + soctrust + test:soctrust, family="binomial")
h5_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h5_binary_j<-glm(BinKnowW3 ~ soctrust, family="binomial")
h5_binary_k<-glm(BinKnowW3 ~ test + soctrust, family="binomial")
h5_binary_l<-glm(BinKnowW3 ~ test + soctrust + test:soctrust, family = "binomial")
h5_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h5_binary_n<-polr(as.factor(BinKnowW12) ~ soctrust, method = "logistic")
h5_binary_o<-polr(as.factor(BinKnowW12) ~ test + soctrust, method = "logistic")
h5_binary_p<-polr(as.factor(BinKnowW12) ~ test + soctrust + test:soctrust, method = "logistic")
h5_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h5_binary_r<-polr(as.factor(BinKnowW23) ~ soctrust, method = "logistic")
h5_binary_s<-polr(as.factor(BinKnowW23) ~ test + soctrust, method = "logistic")
h5_binary_t<-polr(as.factor(BinKnowW23) ~ test + soctrust + test:soctrust, method = "logistic")
h5_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h5_binary_v<-polr(as.factor(BinKnowW13) ~ soctrust, method = "logistic")
h5_binary_w<-polr(as.factor(BinKnowW13) ~ test + soctrust, method = "logistic")
h5_binary_x<-polr(as.factor(BinKnowW13) ~ test + soctrust + test:soctrust, method="logistic")

h6a_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h6a_binary_b<-glm(BinKnowW1 ~ instiTrustNational, family="binomial")
h6a_binary_c<-glm(BinKnowW1 ~ test + instiTrustNational, family="binomial")
h6a_binary_d<-glm(BinKnowW1 ~ test + instiTrustNational + test:instiTrustNational, family="binomial")
h6a_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h6a_binary_f<-glm(BinKnowW2 ~ instiTrustNational, family="binomial")
h6a_binary_g<-glm(BinKnowW2 ~ test + instiTrustNational, family="binomial")
h6a_binary_h<-glm(BinKnowW2 ~ test + instiTrustNational + test:instiTrustNational, family="binomial")
h6a_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h6a_binary_j<-glm(BinKnowW3 ~ instiTrustNational, family="binomial")
h6a_binary_k<-glm(BinKnowW3 ~ test + instiTrustNational, family="binomial")
h6a_binary_l<-glm(BinKnowW3 ~ test + instiTrustNational + test:instiTrustNational, family = "binomial")
h6a_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h6a_binary_n<-polr(as.factor(BinKnowW12) ~ instiTrustNational, method = "logistic")
h6a_binary_o<-polr(as.factor(BinKnowW12) ~ test + instiTrustNational, method = "logistic")
h6a_binary_p<-polr(as.factor(BinKnowW12) ~ test + instiTrustNational + test:instiTrustNational, method = "logistic")
h6a_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h6a_binary_r<-polr(as.factor(BinKnowW23) ~ instiTrustNational, method = "logistic")
h6a_binary_s<-polr(as.factor(BinKnowW23) ~ test + instiTrustNational, method = "logistic")
h6a_binary_t<-polr(as.factor(BinKnowW23) ~ test + instiTrustNational + test:instiTrustNational, method = "logistic")
h6a_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h6a_binary_v<-polr(as.factor(BinKnowW13) ~ instiTrustNational, method = "logistic")
h6a_binary_w<-polr(as.factor(BinKnowW13) ~ test + instiTrustNational, method = "logistic")
h6a_binary_x<-polr(as.factor(BinKnowW13) ~ test + instiTrustNational + test:instiTrustNational, method="logistic")

h6b_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h6b_binary_b<-glm(BinKnowW1 ~ instiTrustGeorgia, family="binomial")
h6b_binary_c<-glm(BinKnowW1 ~ test + instiTrustGeorgia, family="binomial")
h6b_binary_d<-glm(BinKnowW1 ~ test + instiTrustGeorgia + test:instiTrustGeorgia, family="binomial")
h6b_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h6b_binary_f<-glm(BinKnowW2 ~ instiTrustGeorgia, family="binomial")
h6b_binary_g<-glm(BinKnowW2 ~ test + instiTrustGeorgia, family="binomial")
h6b_binary_h<-glm(BinKnowW2 ~ test + instiTrustGeorgia + test:instiTrustGeorgia, family="binomial")
h6b_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h6b_binary_j<-glm(BinKnowW3 ~ instiTrustGeorgia, family="binomial")
h6b_binary_k<-glm(BinKnowW3 ~ test + instiTrustGeorgia, family="binomial")
h6b_binary_l<-glm(BinKnowW3 ~ test + instiTrustGeorgia + test:instiTrustGeorgia, family = "binomial")
h6b_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h6b_binary_n<-polr(as.factor(BinKnowW12) ~ instiTrustGeorgia, method = "logistic")
h6b_binary_o<-polr(as.factor(BinKnowW12) ~ test + instiTrustGeorgia, method = "logistic")
h6b_binary_p<-polr(as.factor(BinKnowW12) ~ test + instiTrustGeorgia + test:instiTrustGeorgia, method = "logistic")
h6b_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h6b_binary_r<-polr(as.factor(BinKnowW23) ~ instiTrustGeorgia, method = "logistic")
h6b_binary_s<-polr(as.factor(BinKnowW23) ~ test + instiTrustGeorgia, method = "logistic")
h6b_binary_t<-polr(as.factor(BinKnowW23) ~ test + instiTrustGeorgia + test:instiTrustGeorgia, method = "logistic")
h6b_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h6b_binary_v<-polr(as.factor(BinKnowW13) ~ instiTrustGeorgia, method = "logistic")
h6b_binary_w<-polr(as.factor(BinKnowW13) ~ test + instiTrustGeorgia, method = "logistic")
h6b_binary_x<-polr(as.factor(BinKnowW13) ~ test + instiTrustGeorgia + test:instiTrustGeorgia, method="logistic")

h7_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h7_binary_b<-glm(BinKnowW1 ~ riskaverse, family="binomial")
h7_binary_c<-glm(BinKnowW1 ~ test + riskaverse, family="binomial")
h7_binary_d<-glm(BinKnowW1 ~ test + riskaverse + test:riskaverse, family="binomial")
h7_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h7_binary_f<-glm(BinKnowW2 ~ riskaverse, family="binomial")
h7_binary_g<-glm(BinKnowW2 ~ test + riskaverse, family="binomial")
h7_binary_h<-glm(BinKnowW2 ~ test + riskaverse + test:riskaverse, family="binomial")
h7_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h7_binary_j<-glm(BinKnowW3 ~ riskaverse, family="binomial")
h7_binary_k<-glm(BinKnowW3 ~ test + riskaverse, family="binomial")
h7_binary_l<-glm(BinKnowW3 ~ test + riskaverse + test:riskaverse, family = "binomial")
h7_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h7_binary_n<-polr(as.factor(BinKnowW12) ~ riskaverse, method = "logistic")
h7_binary_o<-polr(as.factor(BinKnowW12) ~ test + riskaverse, method = "logistic")
h7_binary_p<-polr(as.factor(BinKnowW12) ~ test + riskaverse + test:riskaverse, method = "logistic")
h7_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h7_binary_r<-polr(as.factor(BinKnowW23) ~ riskaverse, method = "logistic")
h7_binary_s<-polr(as.factor(BinKnowW23) ~ test + riskaverse, method = "logistic")
h7_binary_t<-polr(as.factor(BinKnowW23) ~ test + riskaverse + test:riskaverse, method = "logistic")
h7_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h7_binary_v<-polr(as.factor(BinKnowW13) ~ riskaverse, method = "logistic")
h7_binary_w<-polr(as.factor(BinKnowW13) ~ test + riskaverse, method = "logistic")
h7_binary_x<-polr(as.factor(BinKnowW13) ~ test + riskaverse + test:riskaverse, method="logistic")

h8_binary_a<-glm(BinKnowW1 ~ test, family="binomial")
h8_binary_b<-glm(BinKnowW1 ~ normW1, family="binomial")
h8_binary_c<-glm(BinKnowW1 ~ test + normW1, family="binomial")
h8_binary_d<-glm(BinKnowW1 ~ test + normW1 + test:normW1, family="binomial")
h8_binary_e<-glm(BinKnowW2 ~ test, family="binomial")
h8_binary_f<-glm(BinKnowW2 ~ normW2, family="binomial")
h8_binary_g<-glm(BinKnowW2 ~ test + normW2, family="binomial")
h8_binary_h<-glm(BinKnowW2 ~ test + normW2 + test:normW2, family="binomial")
h8_binary_i<-glm(BinKnowW3 ~ test, family="binomial")
h8_binary_j<-glm(BinKnowW3 ~ normW3, family="binomial")
h8_binary_k<-glm(BinKnowW3 ~ test + normW3, family="binomial")
h8_binary_l<-glm(BinKnowW3 ~ test + normW3 + test:normW3, family = "binomial")
h8_binary_m<-polr(as.factor(BinKnowW12) ~ test, method="logistic")
h8_binary_n<-polr(as.factor(BinKnowW12) ~ normW1W2, method = "logistic")
h8_binary_o<-polr(as.factor(BinKnowW12) ~ test + normW1W2, method = "logistic")
h8_binary_p<-polr(as.factor(BinKnowW12) ~ test + normW1W2 + test:normW1W2, method = "logistic")
h8_binary_q<-polr(as.factor(BinKnowW23) ~ test, method = "logistic")
h8_binary_r<-polr(as.factor(BinKnowW23) ~ normW2W3, method = "logistic")
h8_binary_s<-polr(as.factor(BinKnowW23) ~ test + normW2W3, method = "logistic")
h8_binary_t<-polr(as.factor(BinKnowW23) ~ test + normW2W3 + test:normW2W3, method = "logistic")
h8_binary_u<-polr(as.factor(BinKnowW13) ~ test, method = "logistic")
h8_binary_v<-polr(as.factor(BinKnowW13) ~ normW1W3, method = "logistic")
h8_binary_w<-polr(as.factor(BinKnowW13) ~ test + normW1W3, method = "logistic")
h8_binary_x<-polr(as.factor(BinKnowW13) ~ test + normW1W3 + test:normW1W3, method="logistic")

stargazer(h3_binary_d, h3_binary_h, h3_binary_l, h3_binary_p, h3_binary_t, h3_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Risk Aversion", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h3alt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h4_binary_d, h4_binary_h, h4_binary_l, h4_binary_p, h4_binary_t, h4_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Conspiratorial Ideation", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h4alt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)


stargazer(h5_binary_d, h5_binary_h, h5_binary_l, h5_binary_p, h5_binary_t, h5_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Social Trust", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h5alt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)


stargazer(h6a_binary_d, h6a_binary_h, h6a_binary_l, h6a_binary_p, h6a_binary_t, h6a_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: National", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6aalt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)


stargazer(h6b_binary_d, h6b_binary_h, h6b_binary_l, h6b_binary_p, h6b_binary_t, h6b_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Institutional Trust: State", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h6balt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h7_binary_d, h7_binary_h, h7_binary_l, h7_binary_p, h7_binary_t, h7_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Right Wing News", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h7alt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)

stargazer(h8_binary_d, h8_binary_h, h8_binary_l, h8_binary_p, h8_binary_t, h8_binary_x, type = "html", 
          covariate.labels = c("Treatment", "Norm Perception", "Interaction"), 
          dep.var.labels = c("Knowledge: Wave 1", "Knowledge: Wave 2", "Knowledge: Wave 3", "Knowledge Change: Wave 1 to Wave 2", "Knowledge Change: Wave 2 to Wave 3", "Knowledge Change: Wave 1 to Wave 3"), 
          se=list(NULL, NULL, NULL, NULL, NULL, NULL),  out="C:/Users/evanl/Desktop/Projects/COVID/Analysis/h8alt.htm", omit.stat = c("rsq", "f", "ser" ), no.space = TRUE)




## Calculating Values for Abstract and Results Section: 

#t-test

t1 ## Treatment on Threat Perception t-test
talt<-t.test(covidThreatW1[which(covidThreatW1!=99)]~test[which(covidThreatW1!=99)], conf.level=0.9)
talt
range(final_data$covidThreatW1, na.rm=TRUE)
# 0-7, 8 unit scale
# Mean difference =  4.089286-3.770992      
4.089286-3.770992     
# = 0.318294  
# = 0.318294/8
0.318294/8
# 0.03978675 or 3.9%
# CI: 0.0433597 to 0.5932270 
0.0433597/8
#0.005419963 or 0.5%
0.5932270 /8
# 0.07415337 or 7.4%
#p=0.05696

# Interaction of Treatment and Risk Aversion on W1 to W3 Behavior Change

range(fBehaveW13, na.rm=TRUE)
# -1.248469  1.159497
1.248469 +  1.159497
# 2.407966
summary(h3a_x)
# test:riskaverse  0.33024    0.11830   2.791  0.00585 **
0.33024/2.407966
# 0.1371448 or 13.7%
rob_h3a_x
#s=0.13513788
0.33024+(1.96*0.13513788)
# 0.5951102
0.5951102/2.407966
# 0.2471423 or 24.7% [ub]
0.33024-(1.96*0.13513788)
# 0.06536976 
0.06536976 / 2.407966
# 0.02714729 or 2.7% [lb]
# p = 0.00585 or 0.006

# Interaction of Treatment and Risk Aversion on W1 to W3 Atttiude Change

range(attitudeW23, na.rm=TRUE)
# -4  4
# so range=9 due to 0
# 
summary(h3c_x)
# test:riskaverse   0.6901     0.3003   2.298   0.0228 *
0.6901/9
# 0.07667778 or 7.7%
#s=0.3003
0.6901+(1.96*0.07667778)
# 0.8403884
0.8403884/9
# 0.09337649 or 9.3% [ub]
0.6901-(1.96*0.07667778)
# 0.5398116 
0.5398116 / 9
# 0.05997907 or 5.9% [lb]
# p = 0.0228 or 0.023

# Interaction of Treatment and Conspiratorial Ideation on W1 to W3 Perception Change

range(perceptionW13, na.rm=TRUE)
# -4  4
# so range=9 due to 0
summary(h4d_x)
# test:conspir  0.68566    0.26914   2.548   0.0117 *
0.68566/9
# 0.07618444 or 7.6%
#s=0.26914
0.68566+(1.96*0.26914)
# 1.213174
1.213174/9
# 0.1347971 or 13.5% [ub]
0.68566-(1.96*0.26914)
# 0.1581456 
0.1581456 / 9
# 0.01757173 or 1.8% [lb]
# p = 0.0117 or 0.012


# Interaction of Treatment and Conspiratorial ideation on W1 to W2 Behavior Change

range(fBehaveW12, na.rm=TRUE)
# -2.220362  2.469135
2.220362 +2.469135
# 4.689497
summary(h4a_p)
# test:conspir -0.17868    0.08919  -2.003   0.0469 *
-0.17868/4.689497
# -0.03810217 or -3.8%
#s=0.08919
-0.17868+(1.96*0.08919)
# -0.0038676
-0.0038676/4.689497
# -0.0008247366 or -0.1% [ub]
-0.17868-(1.96*0.08919)
# -0.3534924 
-0.3534924 / 4.689497
# -0.0753796 or -7.5% [lb]
# p = 0.0469 or 0.047








#Creating Histograms for Figure 1

# Axios-Ipsos Data

Axios <-read.spss("C:/Users/evanl/Desktop/Projects/Covid/Analysis/Axios-Ipsos data W19 Data.sav", to.data.frame=TRUE)

mask<-as.numeric(Axios$Q27_2)
nrow(mask)

mask<-mask[which(mask!=1)]

hist(mask)


sum(mask==2)

mask[mask==2]<-10
mask[mask==3]<-9
mask[mask==4]<-8
mask[mask==5]<-7
mask[mask==10]<-4
mask[mask==9]<-3
mask[mask==8]<-2
mask[mask==7]<-1

hist(mask)

a1a<-ggplot(data=NULL, aes(mask), y =Freq) +  
            geom_histogram(bins=7) + theme_bw() +
            labs(title=NULL, y="Relative Frequency", x="Mask Wearing Prevalence")

a1a<-a1a + scale_x_continuous(breaks=c(1, 2, 3, 4), labels=c('Never', 'Occasionally but \nnot often', 'Sometimes, but not \nall the time', 'At all times')) + theme(axis.text.x = element_text(family="serif", size=34), axis.text.y = element_text(family="serif", size=34), axis.title = element_text(face="bold", family = "serif", size=34))
a1a<-a1a + scale_y_continuous(labels = function(x) paste0(x/10, "%")) 
a1a    


distance<-as.numeric(Axios$Q27_3)


distance<-distance[which(distance!=1)]

hist(distance)

sum(distance==2)

distance[distance==2]<-10
distance[distance==3]<-9
distance[distance==4]<-8
distance[distance==5]<-7
distance[distance==10]<-4
distance[distance==9]<-3
distance[distance==8]<-2
distance[distance==7]<-1

hist(distance)


b1a<-ggplot(data=NULL, aes(distance)) + geom_histogram(bins=7) + theme_bw() + labs(title=NULL, y="Relative Frequency", x="Social Distancing Prevalence")
b1a<-b1a + scale_x_continuous(breaks=c(1, 2, 3, 4), labels=c("Never", "Occasionally but \nnot often", "Sometimes, but not \nall the time", "At all times")) + theme(axis.text.x = element_text(family="serif", size=34), axis.text.y = element_text(family="serif", size=34), axis.title = element_text(face="bold", family = "serif", size=34))
b1a<-b1a + scale_y_continuous(labels = function(x) paste0(x/10, "%")) 
b1a    

# Sample Data

w1data <- read_dta("C:/Users/evanl/Desktop/Projects/Covid/Analysis/Wave 1 Prelim Data Final.dta")

mask<-w1data$w1q12
mask<-mask[which(mask!=99)]
hist(mask)

mask[mask==3]<-2
mask[mask==4]<-3
mask[mask==5]<-4

a1s<-ggplot(data=NULL, aes(mask)) + geom_histogram(bins=7) + theme_bw() + labs(title=NULL, y="Relative Frequency", x="Mask Wearing Prevalence")
a1s<-a1s + scale_x_continuous(breaks=c(1, 2, 3, 4), labels=c("Never", "Rarely/Some \nof the Time", "Most of \nthe time", "Always")) + theme(axis.text.x = element_text(family="serif", size=34), axis.text.y = element_text(family="serif", size=34), axis.title = element_text(face="bold", family = "serif", size=34))
a1s<-a1s + scale_y_continuous(labels = function(x) paste0(x/10, "%"))    
a1s

distance<-w1data$w1q14
distance<-distance[which(distance!=99)]
hist(distance)

distance[distance==3]<-2
distance[distance==4]<-3
distance[distance==5]<-4

b1s<-ggplot(data=NULL, aes(distance)) + geom_histogram(bins=7) + theme_bw() + labs(title=NULL, y="Relative Frequency", x="Social Distancing Prevalence")
b1s<-b1s + scale_x_continuous(breaks=c(1, 2, 3, 4), labels=c("Never", "Rarely/Some \nof the Time", "Most of \nthe time", "Always")) + theme(axis.text.x = element_text(family="serif", size=34), axis.text.y = element_text(family="serif", size=34), axis.title = element_text(face="bold", family = "serif", size=34))
b1s<-b1s + scale_y_continuous(labels = function(x) paste0(x/10, "%"))     
b1s